-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
The current implementation of Future.toJS (here, here) handles errors coming from the Dart future by rejecting a JS Promise.
This is great so JS code knows that something failed within Dart, but the debugging experience of what happened is not great, because the error text is hardcoded to:
Dart exception thrown from converted Future. Use the properties 'error' to fetch the boxed error and 'stack' to recover the stack trace.
As a JS programmer, I find it odd that I need to unbox objects contained in the emitted error, instead of having a textual description of what's wrong.
In the Flutter engine we're trying something like this, but it'd be nice to have a Future.toJS that exposes the "text" of the underlying error directly in the JS console, so we can stop using a bespoke solution.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status