Last active
July 7, 2017 15:40
-
-
Save diligasi/1aef2e18eeff8f8eb678fc19be952e2f to your computer and use it in GitHub Desktop.
If anything goes wrong catch error and stackoverflow comes to help!!! =-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stackoverflowErrorCatcher() { | |
try { | |
// Try something here, if anything goes wrong | |
// stackoverflow comes to help!!! =-) | |
} catch(e) { | |
console.log("# Caught Error ============================================"); | |
console.log(e.stack); | |
console.log("==========================================================="); | |
window.open("http://stackoverflow.com/search?q=[js] + " + e.message, "_blank"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment