From 2a2d1d568c58464d49c780642e7142b1713e3634 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 4 Oct 2021 14:15:19 +0530 Subject: [PATCH] bubble up exception during convert/caching phase --- lib/utils/file_util.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils/file_util.dart b/lib/utils/file_util.dart index 265b63b78..df3b5a0fa 100644 --- a/lib/utils/file_util.dart +++ b/lib/utils/file_util.dart @@ -213,7 +213,8 @@ Future<_LivePhoto> _downloadLivePhoto(ente.File file, } return _LivePhoto(imageFileCache, videoFileCache); }).catchError((e) { - _logger.warning("failed to download live photos" + e.toString()); + _logger.warning( + "failed to download live photos : ${file.tag()}", e); throw e; }); } @@ -247,7 +248,8 @@ Future _downloadAndCache(ente.File file, BaseCacheManager cacheManager, await outputFile.delete(); return cachedFile; }).catchError((e) { - _logger.warning(e, "failed to download file"); + _logger.warning("failed to download file : ${file.tag()}", e); + throw e; }); }