Enha: Don't supress error logs#1228
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## v7.0.0 #1228 +/- ##
=========================================
Coverage ? 76.87%
=========================================
Files ? 11
Lines ? 333
Branches ? 0
=========================================
Hits ? 256
Misses ? 77
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@marandaneto Not sure if this is the correct approach. Do we only need something like this for |
|
@denrase can you check if this causes problems with the |
|
@marandaneto Not seeing any difference with |
📜 Description
Closes #543
Introduces and
onErrorcallback in theRunZonedGuardedintergrations, so that we can callFlutterError.dumpToConsolewhen an error is caught by the integration.This is done this way, as it's the recommended way per flutter documentation.
Note: Consider calling [FlutterError.presentError](https://api.flutter.dev/flutter/foundation/FlutterError/presentError.html) from your custom error handler in order to see the logs in the console as well.On web this does not yield the same output, but the error name and the StackTrace is there.
💡 Motivation and Context
When executing code in custom runZonedGuarded, errors on web are not logged to the console anymore.
💚 How did you test it?
Added unit test.
📝 Checklist
🔮 Next steps
Discuss if we need to handle other cases as well.