【发布时间】:2019-03-25 16:50:27
【问题描述】:
我正在使用 Haxe 为 CPP 目标编写应用程序的 UI。我需要在应用程序崩溃之前拦截 haxe 错误/异常。
以下是导致应用程序崩溃的代码示例:
@:final private function callFoo(classA : IInterface) : Void
{
if ((mClassLevelVariable != null) && (classA != mClassLevelVariable))
{
throw new Error("Can not work with " + Type.getClassName(Type.getClass((classA))));
}
}
我需要在上面给出的错误导致应用程序崩溃之前拦截崩溃。我们在 Haxe 中是否有像 Java 提供的 Thread.UncaughtExceptionHandler 那样的支持?
【问题讨论】:
标签: exception error-handling haxe hxcpp