Created
December 19, 2012 02:55
-
-
Save fxxkscript/4333991 to your computer and use it in GitHub Desktop.
错误对象
This file contains 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 genericErrorHandler() { | |
console.log("hello"); | |
} | |
try { | |
throw { | |
name: "MyErrorType", | |
message: "oops", | |
extra: "This was rather embarrassing", | |
remeby: genericErrorHandler | |
} | |
} catch (e) { | |
console.log(e.message); | |
e.remeby(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment