You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tobspr_shapez.io/src/js/core/error_handler.js

17 lines
401 B

export let APPLICATION_ERROR_OCCURED = false;
/**
*
* @param {Event|string} message
* @param {string} source
* @param {number} lineno
* @param {number} colno
* @param {Error} source
*/
function catchErrors(message, source, lineno, colno, error) {
APPLICATION_ERROR_OCCURED = true;
console.error(message, source, lineno, colno, error);
}
window.addEventListener("error", catchErrors);