Skip to content

Commit

Permalink
Merge pull request #408 from Cephas369/dev
Browse files Browse the repository at this point in the history
Fixed exception handler preventing debuggers from catching exceptions
  • Loading branch information
Aragas authored Sep 24, 2024
2 parents 8f30b66 + eb141ca commit 47a6037
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Bannerlord.ButterLib/ExceptionHandler/BEWPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ private static void Finalizer(Exception? __exception)
{
if (__exception is not null)
{
if (ExceptionHandlerSubSystem.Instance?.DisableWhenDebuggerIsAttached == true && IsDebuggerAttached())
return;

ExceptionReporter.Show(__exception);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public void Enable()

if (!BEWPatch.IsDebuggerAttached())
SubscribeToUnhandledException();
else if (Instance?.DisableWhenDebuggerIsAttached == true)
return;

if (!_wasButrLoaderInterceptorCalled)
{
Expand Down

0 comments on commit 47a6037

Please sign in to comment.