From 6a7ad14d91d58b7707e5bc37d36fc9eac19c50f6 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 12 Nov 2024 09:15:19 -0500 Subject: [PATCH] better error logging for permission requests --- lib/pangea/utils/download_chat.dart | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/pangea/utils/download_chat.dart b/lib/pangea/utils/download_chat.dart index ab0fee8a2..96d941120 100644 --- a/lib/pangea/utils/download_chat.dart +++ b/lib/pangea/utils/download_chat.dart @@ -41,13 +41,8 @@ Future downloadChat( timeline, room, ); - } catch (err) { - ErrorHandler.logError( - e: Exception( - "Failed to fetch messages for chat ${room.id} in while downloading chat", - ), - s: StackTrace.current, - ); + } catch (err, s) { + ErrorHandler.logError(e: err, s: s); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( @@ -214,12 +209,9 @@ Future downloadFile( directory = await getExternalStorageDirectory(); } } - } catch (err) { + } catch (err, s) { debugPrint("Failed to get download folder path"); - ErrorHandler.logError( - e: Exception("Failed to get download folder path"), - s: StackTrace.current, - ); + ErrorHandler.logError(e: err, s: s); } if (directory != null) { final File f = File("${directory.path}/$filename");