Skip to content

Instantly share code, notes, and snippets.

@AirStair
Last active October 16, 2019 07:09
Show Gist options
  • Save AirStair/b2e7d6d8629a63c1e104d1b336f288bc to your computer and use it in GitHub Desktop.
Save AirStair/b2e7d6d8629a63c1e104d1b336f288bc to your computer and use it in GitHub Desktop.
function jsExceptionStore(JsException) {
var request = new XMLHttpRequest();
request.open('GET', 'js-exception-store?user_agent='.concat(navigator.userAgent, '&js_exception_message=', JsException.message, '&js_exception_file_name=', JsException.fileName, '&js_exception_line_number=', JsException.lineNumber), false);
request.send();
}
try {
throw 'JsException #0';
}
catch (e) {
jsExceptionStore(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment