mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
9 lines
285 B
TypeScript
9 lines
285 B
TypeScript
import { handleUnknownError } from "./utils/ErrorHandler";
|
|
|
|
export function setupUncaughtPromiseHandler(): void {
|
|
window.addEventListener("unhandledrejection", (e) => {
|
|
e.preventDefault();
|
|
handleUnknownError(e.reason, null, "UNCAUGHT PROMISE ERROR. Caused by:\n\n");
|
|
});
|
|
}
|