Created
January 22, 2010 06:49
-
-
Save isaacs/283562 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
var sys = require("sys"); | |
function someFunc () { | |
throw "thrown from someFunc" | |
}; | |
function h1 (m) { | |
sys.debug("caught in h1: "+m); | |
} | |
function h2 (m) { | |
sys.debug("caught in h2: "+m); | |
} | |
process.exceptionCatcher = h1; | |
setTimeout(someFunc); | |
process.exceptionCatcher = h2; | |
setTimeout(someFunc); | |
// expect: "caught in h1: ...\ncaught in h2: ..." | |
// actual: "caught in h2: ...\ncaught in h2: ..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment