engine in ts

This commit is contained in:
Olivier Gagnon
2021-09-24 18:29:25 -04:00
parent ad75fa5ebc
commit 43723a3fbb
8 changed files with 62 additions and 46 deletions
+3 -3
View File
@@ -5,17 +5,17 @@ interface IError {
lineNumber?: number;
}
export function exceptionAlert(e: IError): void {
export function exceptionAlert(e: IError | string): void {
console.error(e);
dialogBoxCreate(
"Caught an exception: " +
e +
"<br><br>" +
"Filename: " +
(e.fileName || "UNKNOWN FILE NAME") +
((e as any).fileName || "UNKNOWN FILE NAME") +
"<br><br>" +
"Line Number: " +
(e.lineNumber || "UNKNOWN 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>" +