Closed cowwoc closed 11 years ago
I don't think it's possible to re-write them, as far as I know. This is something I'm hoping we'll get devtools support for, and I know @wycats is in contact with Pavel about similar needs for skipping/tracing things. Since I don't konw that there's anything I can do here, I'm going to close this ticket.
What prevents you from rewriting Error.stack? It's just a string that you can easily rewrite. Yes, browsers will handle this natively in the future but in the meantime Promise.js can act as a polyfill.
I like
Future.then()
-style callback chaining but it has the nasty side-effect of mangling exception stack-traces in a way that makes code harder to debug.Is it possible for the implementation to programmatically rewrite the stack-trace so
Future.then(A).then(B).then(C)
ends up with a stack-trace that readsC -> B -> A
instead ofC -> Future.wrap -> Future.pump -> anonymous function -> anonymous function
?