sorry @JordanSantiagoYT

this should help with the no error messages hopefully (untested since I don't really have a way to test it, but it was on another repo I tested)
This commit is contained in:
Miss Circle (Moxie)
2024-08-02 09:51:49 -04:00
parent 1ff5256f20
commit a454ba0131

View File

@@ -153,6 +153,9 @@ class Main extends Sprite {
#if CRASH_HANDLER
Lib.current.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onCrash);
#if cpp
untyped __global__.__hxcpp_set_critical_error_handler(onError);
#end
#end
#if DISCORD_ALLOWED DiscordClient.prepare(); #end
@@ -224,4 +227,11 @@ class Main extends Sprite {
Sys.exit(1);
}
#end
#if cpp
private static function onError(message:Dynamic):Void
{
throw Std.string(message);
}
#end
}