Skip to content

Instantly share code, notes, and snippets.

@andrewplummer
Last active August 29, 2015 14:00
Show Gist options
  • Save andrewplummer/11107346 to your computer and use it in GitHub Desktop.
Save andrewplummer/11107346 to your computer and use it in GitHub Desktop.
IE7 odd try/catch behavior
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