[refactor] Moved "exceptionAlert" to its own TS file

Since this is a UI only function, when Web Workers are introduced this
call chain will not be allowed on the backend.
This commit is contained in:
Steven Evans
2018-07-04 00:54:11 -04:00
parent be577164e3
commit 15e3b751da
7 changed files with 26 additions and 18 deletions
+16
View File
@@ -0,0 +1,16 @@
import { dialogBoxCreate } from "../DialogBox";
function exceptionAlert(e) {
dialogBoxCreate("Caught an exception: " + e + "<br><br>" +
"Filename: " + (e.fileName || "UNKNOWN FILE NAME") + "<br><br>" +
"Line Number: " + (e.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");
}
export {
exceptionAlert
}