diff --git a/lib/widget/dynamic_album_browser.dart b/lib/widget/dynamic_album_browser.dart index 79bdd88a..0310e1b2 100644 --- a/lib/widget/dynamic_album_browser.dart +++ b/lib/widget/dynamic_album_browser.dart @@ -162,8 +162,19 @@ class _DynamicAlbumBrowserState extends State Future _initAlbum() async { assert(widget.album.provider is AlbumDynamicProvider); - final items = await PreProcessAlbum(AppDb())(widget.account, widget.album); - final album = await _updateAlbumPostPopulate(widget.album, items); + final List items; + final Album album; + try { + items = await PreProcessAlbum(AppDb())(widget.account, widget.album); + album = await _updateAlbumPostPopulate(widget.album, items); + } catch (e, stackTrace) { + _log.severe("[_initAlbum] Failed while PreProcessAlbum", e, stackTrace); + SnackBarManager().showSnackBar(SnackBar( + content: Text(exception_util.toUserString(e)), + duration: k.snackBarDurationNormal, + )); + return; + } if (mounted) { setState(() { _album = album;