Closed
Description
Describe the bug
Any runtime exceptions in the .configure named parameters do not show in the console. i.e. onMessage
To Reproduce
Steps to reproduce the behavior:
- Configure the onMessage parameter on the FirebaseMessaging class and throw any exception
_fcm.configure(
onMessage: (Map<String, dynamic> pushMessage) async {
print("onMessage: $pushMessage");
throw (Exception(["Thrown in configure"]));
await handleIncomingMessage(pushMessage);
}
2. Send the device a push message via the fcm token
3. Notice no Exception
**Expected behavior**
All exceptions not in try-catch constructs should be shown in the flutter console.
**Additional context**
Any code called from within this onMessage parameter will not surface exceptions
**Flutter doctor**
Run `flutter doctor` and paste the output below:
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.3)
[✓] Connected device (2 available)
• No issues found!