Update UnhandledExceptionHandler
This commit is contained in:
1 parent
e236535a42
commit
6f9fcfc03a
1 file changed
+1
-10
+1
-10
@@ -453,16 +453,7 @@ namespace Vocaluxe
|
|||||||
[HandleProcessCorruptedStateExceptions]
|
[HandleProcessCorruptedStateExceptions]
|
||||||
private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
|
private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
|
||||||
{
|
{
|
||||||
var e = (Exception)args.ExceptionObject;
|
CLog.Fatal((Exception)args.ExceptionObject, "Unhandled exception: {ExceptionMessage}", CLog.Params(e.Message));
|
||||||
string stackTrace = "";
|
|
||||||
try
|
|
||||||
{
|
|
||||||
stackTrace = e.StackTrace;
|
|
||||||
}
|
|
||||||
catch {}
|
|
||||||
MessageBox.Show("Unhandled exception: " + e.Message + stackTrace);
|
|
||||||
CLog.Error("Unhandled exception: " + e.Message + stackTrace);
|
|
||||||
_CloseProgram();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user