mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
Add injector option to not apply any exception handlers (#1541)
* Add injector option to not apply any exception handlers * Log as warning if NoExceptionHandlers is set
This commit is contained in:
parent
70249a4db0
commit
5777745ab3
6 changed files with 18 additions and 37 deletions
|
|
@ -147,7 +147,8 @@ public sealed class EntryPoint
|
|||
LogLevelSwitch.MinimumLevel = configuration.LogLevel;
|
||||
|
||||
// Log any unhandled exception.
|
||||
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
|
||||
if (!info.NoExceptionHandlers)
|
||||
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
|
||||
TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
|
||||
|
||||
var unloadFailed = false;
|
||||
|
|
@ -196,7 +197,8 @@ public sealed class EntryPoint
|
|||
finally
|
||||
{
|
||||
TaskScheduler.UnobservedTaskException -= OnUnobservedTaskException;
|
||||
AppDomain.CurrentDomain.UnhandledException -= OnUnhandledException;
|
||||
if (!info.NoExceptionHandlers)
|
||||
AppDomain.CurrentDomain.UnhandledException -= OnUnhandledException;
|
||||
|
||||
Log.Information("Session has ended.");
|
||||
Log.CloseAndFlush();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue