Created
February 12, 2011 19:50
-
-
Save mynyml/824049 to your computer and use it in GitHub Desktop.
Thrown Error not raised unless data gets printed to stdout beforehand
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
# NOTE: | |
# uncommenting either of the two `console.log ''` lines bellow will "fix" the problem, and the error message will be printed to stdout. | |
# Also interesting: if the line `console.log 'in finally'` is replaced with `util.debug 'in finally'`, the problem comes back (i.e. even with the log lines uncommented) | |
require('path').exists '/tmp/alskdjf', (exists) -> | |
try | |
# console.log '' | |
throw new Error | |
finally | |
console.log 'in finally' | |
# console.log '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment