[Android] Add logging when an exception is thrown

Robert Stone git at videolan.org
Tue Feb 23 05:21:57 UTC 2021


vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Mon Feb 15 22:59:46 2021 -0800| [af2dfb97315abed14be249b8d799c7cd258c3806] | committer: Nicolas Pomepuy

Add logging when an exception is thrown

> https://code.videolan.org/videolan/vlc-android/commit/af2dfb97315abed14be249b8d799c7cd258c3806
---

 application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index e1cb76d29..009f3f2c2 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -1409,8 +1409,9 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
         lifecycleScope.launch(Dispatchers.IO) {
             try {
                 result.sendResult(MediaSessionBrowser.browse(applicationContext, parentId))
-            } catch (ignored: RuntimeException) {
-            } //bitmap parcelization can fail
+            } catch (e: RuntimeException) {
+                Log.e(TAG, "Failed to load children for $parentId", e);
+            }
         }
     }
 



More information about the Android mailing list