import { dialogBoxCreate } from "../DialogBox";
interface IError {
fileName?: string;
lineNumber?: number;
}
export function exceptionAlert(e: IError | string): void {
console.error(e);
dialogBoxCreate(
"Caught an exception: " +
e +
"
" +
"Filename: " +
((e as any).fileName || "UNKNOWN FILE NAME") +
"
" +
"Line Number: " +
((e as any).lineNumber || "UNKNOWN LINE NUMBER") +
"
" +
"This is a bug, please report to game developer with this " +
"message as well as details about how to reproduce the bug.
" +
"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your " +
"safe doesn't get corrupted",
false,
);
}