Skip to content

Instantly share code, notes, and snippets.

@mynyml
Created February 12, 2011 19:50
Show Gist options
  • Save mynyml/824049 to your computer and use it in GitHub Desktop.
Save mynyml/824049 to your computer and use it in GitHub Desktop.
Thrown Error not raised unless data gets printed to stdout beforehand
# 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