music: add stack trace to async load task error

This commit is contained in:
Alexander Capehart
2024-06-28 20:23:29 -06:00
parent 8beb2ef4af
commit c8fa389267
@@ -438,7 +438,7 @@ constructor(
// to cascade to and cancel all other routines before finally bubbling up // to cascade to and cancel all other routines before finally bubbling up
// to the main extractor loop. // to the main extractor loop.
logE("MediaStore extraction failed: $e") logE("MediaStore extraction failed: $e")
incompleteSongs.close(Exception("MediaStore extraction failed: $e")) incompleteSongs.close(Exception("MediaStore extraction failed: ${e.stackTraceToString()}"))
return@async return@async
} }
incompleteSongs.close() incompleteSongs.close()
@@ -453,7 +453,7 @@ constructor(
tagExtractor.consume(incompleteSongs, completeSongs) tagExtractor.consume(incompleteSongs, completeSongs)
} catch (e: Exception) { } catch (e: Exception) {
logE("Tag extraction failed: $e") logE("Tag extraction failed: $e")
completeSongs.close(Exception("Tag extraction failed: $e")) completeSongs.close(Exception("Tag extraction failed: ${e.stackTraceToString()}"))
return@async return@async
} }
completeSongs.close() completeSongs.close()
@@ -470,7 +470,7 @@ constructor(
completeSongs, processedSongs, separators, nameFactory) completeSongs, processedSongs, separators, nameFactory)
} catch (e: Exception) { } catch (e: Exception) {
logE("DeviceLibrary creation failed: $e") logE("DeviceLibrary creation failed: $e")
processedSongs.close(Exception("DeviceLibrary creation failed: $e")) processedSongs.close(Exception("DeviceLibrary creation failed: ${e.stackTraceToString()}"))
return@async Result.failure(e) return@async Result.failure(e)
} }
processedSongs.close() processedSongs.close()