Closed
Description
Consider the following code:
main() {
new Future.immediate(null).chain(() {
throw 'error';
}).then(() {});
}
The trace and line information of the original exception is not reported. Instead, it's reported as being thrown from within the call to "then". This makes it extremely difficult to debug errors in asynchronous code that uses futures heavily, since it's impossible to tell where an exception was originally thrown.