Created
February 25, 2011 14:32
-
-
Save arumons/843859 to your computer and use it in GitHub Desktop.
コールバック関数中の例外発生時の例1
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
| function foo(fn) { | |
| fn(); | |
| } | |
| try { | |
| foo(function() { | |
| throw "test"; | |
| }); | |
| } catch (e) { | |
| //ここに到達します | |
| console.log("ok?"); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment