mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 18:23:54 +01:00
26 lines
758 B
TypeScript
26 lines
758 B
TypeScript
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
|
|
|
interface IError {
|
|
fileName?: string;
|
|
lineNumber?: number;
|
|
}
|
|
|
|
export function exceptionAlert(e: IError | string): void {
|
|
console.error(e);
|
|
dialogBoxCreate(
|
|
"Caught an exception: " +
|
|
e +
|
|
"<br><br>" +
|
|
"Filename: " +
|
|
((e as any).fileName || "UNKNOWN FILE NAME") +
|
|
"<br><br>" +
|
|
"Line Number: " +
|
|
((e as any).lineNumber || "UNKNOWN LINE NUMBER") +
|
|
"<br><br>" +
|
|
"This is a bug, please report to game developer with this " +
|
|
"message as well as details about how to reproduce the bug.<br><br>" +
|
|
"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your " +
|
|
"safe doesn't get corrupted",
|
|
);
|
|
}
|