Add correct exit code to catch

This commit is contained in:
Daniel_I_Am 2021-03-14 18:03:18 +01:00
parent 67bde5a610
commit 13a4b5c6c5
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84

View File

@ -35,7 +35,7 @@ namespace ChaosBot
catch (Exception ex) catch (Exception ex)
{ {
Console.Write($"{MethodBase.GetCurrentMethod()?.ReflectedType?.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>.\n{ex.StackTrace}"); Console.Write($"{MethodBase.GetCurrentMethod()?.ReflectedType?.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>.\n{ex.StackTrace}");
return; Environment.Exit(1);
} }
/* /*
@ -53,6 +53,7 @@ namespace ChaosBot
catch (Exception ex) catch (Exception ex)
{ {
LoggingFacade.Exception(ex); LoggingFacade.Exception(ex);
Environment.Exit(1);
} }
} }