This commit is contained in:
oc 2018-11-22 00:45:55 +08:00
parent 62519916a5
commit abd6f8cbef

View File

@ -3,6 +3,30 @@ function editor() {
this.brushMod = "line";//["line","rectangle","tileset"]
this.layerMod = "map";//["fgmap","map","bgmap"]
this.isMobile = false;
window.onerror = function (msg, url, lineNo, columnNo, error) {
var string = msg.toLowerCase();
var substring = "script error";
var message;
if (string.indexOf(substring) > -1){
message = 'Script Error: See Browser Console for Detail';
} else {
message = [
'Message: ' + msg,
'URL: ' + url,
'Line: ' + lineNo,
'Column: ' + columnNo,
'Error object: ' + JSON.stringify(error)
].join(' - ');
// alert(message);
}
try {
printe(message)
} catch (e) {
alert(message);
}
return false;
};
}
/*