Skip to content

Instantly share code, notes, and snippets.

@xeolabs
Created February 5, 2016 11:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xeolabs/40a4f8706fd2a895151b to your computer and use it in GitHub Desktop.
Save xeolabs/40a4f8706fd2a895151b 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;
}
@rc5hack
Copy link

rc5hack commented Feb 5, 2016

why http, not https?

@IDisposable
Copy link

You really should encodeURIComponent(e.Message || e);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment