c# aot try-catch not work
Dan Yang
0
Reputation points
I used c# aot to compile lib for go use.
An exception occurs in lib and the process crashes.
I hope the process doesn't crash and that bugs can be reported.
How can I keep the process from crashing.
If it crashes, is there any way to find the location of the crash?
[UnmanagedCallersOnly(EntryPoint = "NativeTest")]
public static void NativeTest()
{
try
{
List<int> ints = new List<int>();
ints = null;
ints[0] = 110;
}
catch (System.Exception e)
{
Log.Info(e.ToString());
}
}
Sign in to answer