Skip to content

Commit

Permalink
Add exception class to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyicker committed Sep 19, 2024
1 parent a8c017f commit 27ab7a9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,14 +807,15 @@ internal class ExoPlayerPlaybackEngine(
var crawler: Throwable? = error
var playbackInfoFetchException: PlaybackInfoFetchException? = null

var errorMessage = "${error.errorCodeName}: ${crawler?.message}"
var errorMessage =
"${error.errorCodeName}: ${crawler?.message} (${crawler?.javaClass?.name})"
while (crawler?.cause != null) {
@Suppress("MagicNumber")
if ((crawler as? InvalidResponseCodeException)?.responseCode == 416) {
playerCache.clear()
}
crawler = crawler.cause
errorMessage += " -> ${crawler?.message}"
errorMessage += " -> ${crawler?.message} (${crawler?.javaClass?.name})"
if (crawler is PlaybackInfoFetchException) {
playbackInfoFetchException = crawler
}
Expand Down

0 comments on commit 27ab7a9

Please sign in to comment.