mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Exceptions during splash screen / net core startup do not exit electron process #411
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ErikApption on GitHub (Nov 6, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
.net core 3.0 - no node js
Steps to Reproduce:
I tried doing a try/catch with Electron.App.Exit() but this did not close the electron process with the splash screen...
@OmiCron07 commented on GitHub (Nov 28, 2019):
I got an exception when starting my application and I just find out that you can click on the splash to quit/kill the Electron processes. Same too doing Ctrl+C in the cmd box.
@GregorBiswanger commented on GitHub (Nov 30, 2019):
We need a solution for a global exception handling in .net core... I didn´t mean the ErrorMiddleware... that is only for request/response error handling... but I don´t find a global exception handling...
You must set a try-catch block self. In the catch block you can exit the application.
Alternative, you can use the shortcut
[Ctrl] + [C]in the cmd box (thx @OmiCron07) or click on splashscreen and use[Alt] + [F4].This code works for me, to close the app with splashscreen: