changing loop error message to close issue 5345
parent
8331d90d20
commit
18901149d9
|
@ -5,7 +5,11 @@ window.common = (function(global) {
|
|||
} = global;
|
||||
|
||||
loopProtect.hit = function hit(line) {
|
||||
var err = `Error: Exiting potential infinite loop at line ${line}.`;
|
||||
var err = 'Error: Exiting potential infinite loop at line ' +
|
||||
line +
|
||||
'. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' +
|
||||
'line. Beware that if you do have an infinite loop in your code' +
|
||||
'this will crash your browser.';
|
||||
console.error(err);
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,11 @@ window.common = (function(global) {
|
|||
window.__err = null;
|
||||
window.loopProtect.hit = function(line) {
|
||||
window.__err = new Error(
|
||||
'Potential infinite loop at line ' + line
|
||||
'Potential infinite loop at line ' +
|
||||
line +
|
||||
'. To disable loop protection, write: \\n\\/\\/ noprotect\\nas the first' +
|
||||
' line. Beware that if you do have an infinite loop in your code' +
|
||||
' this will crash your browser.'
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue