We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c53677 commit 5159788Copy full SHA for 5159788
src/UnityDebuggerAssistant/Patches/Exception.cs
@@ -3,13 +3,14 @@
3
using System.Collections.Generic;
4
using HarmonyLib;
5
using UnityDebuggerAssistant.Utils;
6
+using System.Collections.Concurrent;
7
8
namespace UnityDebuggerAssistant.Patches;
9
[HarmonyPatch]
10
public static class ExceptionConstructorPatch
11
{
12
- internal static readonly List<Exception> Storage = [];
13
+ internal static readonly ConcurrentStack<Exception> Storage = [];
14
15
static IEnumerable<MethodBase> TargetMethods()
16
@@ -18,10 +19,7 @@ static IEnumerable<MethodBase> TargetMethods()
18
19
20
static void Postfix(Exception __instance)
21
- if (Storage.Contains(__instance))
22
- return;
23
-
24
- Storage.Add(__instance);
+ Storage.Push(__instance);
25
}
26
27
internal static class ExceptionProcessor
0 commit comments