Skip to content

Instantly share code, notes, and snippets.

@iamstoick
Forked from xeolabs/tryCatchSO.js
Created February 7, 2016 12:09
Show Gist options
  • Save iamstoick/a7302cc1364c0ef982b8 to your computer and use it in GitHub Desktop.
Save iamstoick/a7302cc1364c0ef982b8 to your computer and use it in GitHub Desktop.
try {
function foo() {
foo();
}
foo();
} catch(e) {
window.location.href="http://stackoverflow.com/search?q=[js]+" + e.message || e;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment