mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Add C++ exception handler
This commit is contained in:
@@ -97,7 +97,7 @@ extern "C" void JSCInitialize() {
|
||||
JSC::Options::exposeInternalModuleLoader() = true;
|
||||
JSC::Options::useSharedArrayBuffer() = true;
|
||||
// JSC::Options::useAtMethod() = true;
|
||||
// std::set_terminate([]() { Zig__GlobalObject__onCrash(); });
|
||||
std::set_terminate([]() { Zig__GlobalObject__onCrash(); });
|
||||
WTF::initializeMainThread();
|
||||
JSC::initialize();
|
||||
}
|
||||
|
||||
@@ -431,7 +431,8 @@ pub fn NewGlobalObject(comptime Type: type) type {
|
||||
}
|
||||
|
||||
Output.flush();
|
||||
std.os.abort();
|
||||
const Reporter = @import("../../../report.zig");
|
||||
Reporter.fatal(null, "A C++ exception occurred");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user