mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-02 04:47:01 +08:00
Log uncaught exceptions
They are already being sent to Crashalytics, but I would still like to log them in the debug log. It makes debugging everything much easier.
This commit is contained in:
@ -20,6 +20,8 @@ void main() async {
|
||||
runZoned<Future<void>>(() async {
|
||||
await JournalApp.main();
|
||||
}, onError: (Object error, StackTrace stackTrace) async {
|
||||
print("Uncaught Exception: " + error.toString());
|
||||
print(stackTrace);
|
||||
await FlutterCrashlytics()
|
||||
.reportCrash(error, stackTrace, forceCrash: false);
|
||||
});
|
||||
|
Reference in New Issue
Block a user