joyent/node — Issue #2537: [feature] Some way to rewrite Error line numbers?
Author: thejh
Created: 2012-01-15 17:33:54+00:00
State: open

Hello,
for things like coffeescript, it would be cool to be able to rewrite line numbers before they're displayed. Unfortunately, I can't really think of a way to get all Errors in a clean way. Do you think it would be possible to add some way to manipulate errors in the following cases? I guess that should already handle most cases in which it's not possible/easy to manually call a reformatting function on the error.

- uncaught stuff (difference to the `uncaughtException` event: don't prevent the process from crashing)
- stuff the REPL catches

Maybe the interface could be like this? `process.on('exception')`