Created
February 25, 2011 14:40
-
-
Save arumons/843868 to your computer and use it in GitHub Desktop.
コールバック関数中の例3
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 foo(fn) { | |
process.nextTick(fn); | |
} | |
var count = 0; | |
foo(function() { | |
try { | |
console.log(count++); | |
throw "test"; | |
} catch (e) { | |
//キャッチ可能 | |
process.nextTick(arguments.callee); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment