From 251197b47b5564408635c36fb4401c13a39d35c3 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Fri, 21 Feb 2025 15:05:13 -0700 Subject: [PATCH] musikr: accidental logging Including this for posterity with the actual release build --- .../org/oxycblt/musikr/pipeline/PipelineException.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineException.kt b/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineException.kt index 1f6efc892b..292d8d2217 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineException.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineException.kt @@ -18,6 +18,7 @@ package org.oxycblt.musikr.pipeline +import android.util.Log import org.oxycblt.musikr.fs.DeviceFile import org.oxycblt.musikr.playlist.PlaylistFile import org.oxycblt.musikr.playlist.interpret.PrePlaylist @@ -54,35 +55,45 @@ sealed interface WhileProcessing { internal suspend fun wrap(file: DeviceFile, block: suspend (DeviceFile) -> R): R = try { + Log.d("wrap", "Processing DeviceFile ${file.path}") block(file) } catch (e: Exception) { + Log.e("wrap", "Error while processing DeviceFile ${file.path}", e) throw PipelineException(WhileProcessing.AFile(file), e) } internal suspend fun wrap(song: RawSong, block: suspend (RawSong) -> R): R = try { + Log.d("wrap", "Processing RawSong ${song.file.path}") block(song) } catch (e: Exception) { + Log.e("wrap", "Error while processing RawSong ${song.file.path}", e) throw PipelineException(WhileProcessing.ARawSong(song), e) } internal suspend fun wrap(file: PlaylistFile, block: suspend (PlaylistFile) -> R): R = try { + Log.d("wrap", "Processing PlaylistFile ${file.name}") block(file) } catch (e: Exception) { + Log.e("wrap", "Error while processing PlaylistFile ${file.name}", e) throw PipelineException(WhileProcessing.APlaylistFile(file), e) } internal suspend fun wrap(song: PreSong, block: suspend (PreSong) -> R): R = try { + Log.d("wrap", "Processing PreSong ${song.path}") block(song) } catch (e: Exception) { + Log.e("wrap", "Error while processing PreSong ${song.path}", e) throw PipelineException(WhileProcessing.APreSong(song), e) } internal suspend fun wrap(playlist: PrePlaylist, block: suspend (PrePlaylist) -> R): R = try { + Log.d("wrap", "Processing PrePlaylist ${playlist.name}") block(playlist) } catch (e: Exception) { + Log.e("wrap", "Error while processing PrePlaylist ${playlist.name}", e) throw PipelineException(WhileProcessing.APrePlaylist(playlist), e) }