Skip to content

Commit

Permalink
Show inner exception for userspace errors if available
Browse files Browse the repository at this point in the history
  • Loading branch information
xezno committed Sep 8, 2024
1 parent 34cc080 commit 5568829
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Mocha.Engine/BaseGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ private void TryCallMethodOnEntity( string methodName )
}
catch ( Exception ex )
{
Notify.AddError( ex.GetType().Name, ex.Message, FontAwesome.Exclamation );
var targetEx = ex.InnerException ?? ex;

Log.Error( ex );
Notify.AddError( targetEx.GetType().Name, targetEx.Message, FontAwesome.Exclamation );

Log.Error( targetEx );

FailedMethods.Add( methodHash );
}
Expand Down

0 comments on commit 5568829

Please sign in to comment.