Skip to content

Commit

Permalink
skip 2 frames
Browse files Browse the repository at this point in the history
Finally was able to compile luatrauma
And stack trace seems to be 1 frame longer than in harmony patch
also you need System.Diagnostics (kek)
  • Loading branch information
Honkbinger authored Sep 29, 2024
1 parent 6547106 commit 2de0dbd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
Expand Down Expand Up @@ -832,7 +833,7 @@ private void TryRun(Action action, string messageMethodName, string messageTypeN
{
StackTrace st = new StackTrace(e);
String s = String.Join('\n',
st.GetFrames().SkipLast(1)
st.GetFrames().SkipLast(2)
.Select(f => $" at {f.GetMethod().DeclaringType}.{f.GetMethod().Name}()")
);

Expand Down

0 comments on commit 2de0dbd

Please sign in to comment.