Closed lesmo closed 9 years ago
Will take a look. The mapping is done via sourcemaps, but if IIRC that's typically done before trycatch receives the error. This works correctly with traceur, but I'll figure out why it's failing with CoffeeScript.
Looks like source-map support is provided by the transpiler / runtime, and is unrelated to trycatch (probably). There's also the possibility that the recent commit to switch to using the native StackFrame.toString()
instead of an included one, may have automatically fixed the issue.
When running CoffeeScript files directly from the code, via
require('coffee-script').register();
for example, Stack Traces are generated incorrectly bytrycatch
module; for example, line number 117 is shown in the trace, but it's really line 84 in the CoffeeScript file.When running CoffeeScript files without using
trycatch
module, line numbers are shown correctly in the "normal" Stack Trace generated when an Error is thrown.I'm not sure how CoffeeScript achieves this "mapping" of Stack Traces when compiling on the fly, so I can't provide much help there (I might try to later).