Browse Source

Fix: log stacktrace with error

Neeraj Gupta 2 years ago
parent
commit
cf092f6fde
1 changed files with 6 additions and 2 deletions
  1. 6 2
      lib/ui/shared_collections_gallery.dart

+ 6 - 2
lib/ui/shared_collections_gallery.dart

@@ -111,8 +111,12 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
         if (snapshot.hasData) {
         if (snapshot.hasData) {
           return _getSharedCollectionsGallery(snapshot.data!);
           return _getSharedCollectionsGallery(snapshot.data!);
         } else if (snapshot.hasError) {
         } else if (snapshot.hasError) {
-          _logger.shout(snapshot.error);
-          return Center(child: Text(snapshot.error.toString()));
+          _logger.severe(
+            "critical: failed to load share gallery",
+            snapshot.error,
+            snapshot.stackTrace,
+          );
+          return const Center(child: Text("Something went wrong."));
         } else {
         } else {
           return const EnteLoadingWidget();
           return const EnteLoadingWidget();
         }
         }