From 65de6a83b51268302d6d50f61e553efe9bbb36fe Mon Sep 17 00:00:00 2001 From: Vishesh Handa <me@vhanda.in> Date: Tue, 10 Aug 2021 17:58:52 +0200 Subject: [PATCH] Try to fix Sentry issue I'm really not sure what is going on over here. Fixes APP-197 --- lib/error_reporting.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/error_reporting.dart b/lib/error_reporting.dart index 1939a546..26843932 100644 --- a/lib/error_reporting.dart +++ b/lib/error_reporting.dart @@ -84,7 +84,8 @@ bool _initReportCrashes() { return !JournalApp.isInDebugMode && AppSettings.instance.collectCrashReports; } -Future<void> reportError(dynamic error, StackTrace stackTrace) async { +Future<void> reportError(Object error, StackTrace stackTrace) async { + assert(error is Exception || error is Error); Log.e("Uncaught Exception", ex: error, stacktrace: stackTrace); if (reportCrashes) {