Skip to content

Instantly share code, notes, and snippets.

@geotheory
Created March 9, 2021 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geotheory/88c2695430e4d4a8f27e7d5c295ae7bd to your computer and use it in GitHub Desktop.
Save geotheory/88c2695430e4d4a8f27e7d5c295ae7bd to your computer and use it in GitHub Desktop.
// debug javscript errors with alerts
window.onerror = function (msg, url, lineNo, columnNo, error) {
var error_msg = ['msg: ' + msg, 'url: ' + url, 'lineNo: ' + lineNo, 'columnNo: ' + columnNo, 'error: ' + error].join('\n');
window.alert(error_msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment