Temporarily disable error handling

This commit is contained in:
Flashfyre 2024-05-02 09:00:36 -04:00
parent 0185dd639e
commit 3a7a48fe83
1 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,7 @@ import { LoadingScene } from './loading-scene';
window.onerror = function (message, source, lineno, colno, error) { window.onerror = function (message, source, lineno, colno, error) {
console.error(error); console.error(error);
let errorString = `Received unhandled error. Open browser console and click OK to see details.\nError: ${message}\nSource: ${source}\nLine: ${lineno}\nColumn: ${colno}\nStack: ${error.stack}`; let errorString = `Received unhandled error. Open browser console and click OK to see details.\nError: ${message}\nSource: ${source}\nLine: ${lineno}\nColumn: ${colno}\nStack: ${error.stack}`;
alert(errorString); //alert(errorString);
// Avoids logging the error a second time. // Avoids logging the error a second time.
return true; return true;
}; };
@ -22,8 +22,9 @@ window.onerror = function (message, source, lineno, colno, error) {
// Catch global promise rejections and display them in an alert so users can report the issue. // Catch global promise rejections and display them in an alert so users can report the issue.
window.addEventListener('unhandledrejection', (event) => { window.addEventListener('unhandledrejection', (event) => {
let errorString = `Received unhandled promise rejection. Open browser console and click OK to see details.\nReason: ${event.reason}`; let errorString = `Received unhandled promise rejection. Open browser console and click OK to see details.\nReason: ${event.reason}`;
alert(errorString); console.error(event.reason);
}); //alert(errorString);
});
const config: Phaser.Types.Core.GameConfig = { const config: Phaser.Types.Core.GameConfig = {
type: Phaser.WEBGL, type: Phaser.WEBGL,