Last active
July 25, 2016 08:17
-
-
Save Microfed/f132f0b5141588802508592f9ce083aa to your computer and use it in GitHub Desktop.
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 throwError() { | |
throw new Error('Text of the error'); | |
} | |
function reportError() { | |
window.onerror.apply(window, arguments); | |
} | |
window.onerror = console.log.bind(console); | |
setTimeout(throwError, 1000); | |
setTimeout(reportError.bind(null, "report error by hand!"), 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment