Last active
August 29, 2015 14:00
-
-
Save andrewplummer/11107346 to your computer and use it in GitHub Desktop.
IE7 odd try/catch behavior
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
throwAnError = function () { | |
throw new Error('Erroring!'); | |
} | |
window.windowMappedError = throwAnError; | |
try { | |
throwAnError(); | |
} catch(e) { | |
alert('Caught the global error'); | |
} | |
try { | |
// IE7 will not properly throw this error | |
windowMappedError(); | |
} catch(e) { | |
alert('Caught the window mapped error'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment