[ddc] Error messages no longer appearing when running apps in Chrome #55893
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
P3
A lower priority bug or feature request
web-dev-compiler
Chrome recently made a change that broke the printing of our error messages in the console when errors are uncaught.
See: https://chromium-review.googlesource.com/c/v8/v8/+/5378709
In this code I would hope to see the the cast failure message in the console:
Instead all you get is:
If you inspect the error before it gets thrown you can still see
.message
contains"TypeError: "hello": type 'String' is not a subtype of type 'int'"
.To fix this, it seems like we need to pass the message to the Error constructor. Then it appears in the console like it used to.
If you run the same code in firefox the console shows:
This adds additional complications to calls of
Error.throwWithStackTrace
where the desired stack trace is missing from the message:Chrome doesn't show the
.message
from the current getter implementation.Firefox shows both like Chrome used to do:
The text was updated successfully, but these errors were encountered: