nullpointer
nullpointer
CC#
Created by nullpointer on 11/11/2024 in #help
how to delegate on static method
Hi, I want to delegate from a static method to delegate trapped exceptions from Godot. By nature, all un-caught exceptions from this block are caught inside Godot and only logged at the end.
catch (Exception ex)
{
ExceptionUtils.LogException(ex);
*ret = new godot_variant();
return godot_bool.False;
}
catch (Exception ex)
{
ExceptionUtils.LogException(ex);
*ret = new godot_variant();
return godot_bool.False;
}
So I want to delegate from ExceptionUtils.LogException(ex); to my own handler to get the exceptions. I have tried a lot, but to no avail. The method signature is.
Namespace Godot.NativeInterop
{
internal static class ExceptionUtils
{
public static void LogException(Exception e)
}
}
Namespace Godot.NativeInterop
{
internal static class ExceptionUtils
{
public static void LogException(Exception e)
}
}
Currently I'm using a hook to work with AppDomain.CurrentDomain.FirstChanceException , but I only want to catch exceptions from the original Godot catch block. Here the actual code of my hook https://github.com/MikeSchulze/gdUnit4Net/blob/master/api/src/core/hooks/GodotExceptionHook.cs Any ideas?
3 replies
CC#
Created by nullpointer on 5/31/2023 in #help
❔ System.MissingMethodException: Entry point not found in assembly
Hi i try to run an example program build inside my library. When i run the debuger (Visual Studio Code) i got an exception Unhandled exception. System.MissingMethodException: Entry point not found in assembly 'gdUnit4Mono, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null'. C# extension is installed, the libary is build
8 replies