Skip to content

Futures clobber exception stacks #2763

Closed
@nex3

Description

@nex3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions