diff --git a/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt b/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt index fafda84..c3206ec 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt @@ -83,13 +83,13 @@ internal class ExoplayerDownloadEngine @Inject constructor( if (hasSnowCone() && e is ForegroundServiceStartNotAllowedException) { stateModifier.dispatch(ErrorAction(DownloadServiceLaunchedInBackground(audioPlayable.id, e))) } else { - stateModifier.dispatch(ErrorAction(ArmadilloIOException(cause = e, whatActionFailedMessage = "Can't prepare download."))) + stateModifier.dispatch(ErrorAction(ArmadilloIOException(cause = e, actionThatFailedMessage = "Can't prepare download."))) } } } override fun onPrepareError(helper: DownloadHelper, e: IOException) = - stateModifier.dispatch(ErrorAction(ArmadilloIOException(cause = e, whatActionFailedMessage = "Can't report download error."))) + stateModifier.dispatch(ErrorAction(ArmadilloIOException(cause = e, actionThatFailedMessage = "Can't report download error."))) }) } } diff --git a/Armadillo/src/main/java/com/scribd/armadillo/error/ArmadilloException.kt b/Armadillo/src/main/java/com/scribd/armadillo/error/ArmadilloException.kt index e28d062..86b8db3 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/error/ArmadilloException.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/error/ArmadilloException.kt @@ -58,8 +58,8 @@ data class HttpResponseCodeException(val responseCode: Int, val url: String?, ov override val errorCode: Int = 200 } -class ArmadilloIOException(cause: Exception, whatActionFailedMessage: String) - : ArmadilloException(cause = cause, message = "A critical playback issue occurred: $whatActionFailedMessage") { +class ArmadilloIOException(cause: Exception, actionThatFailedMessage: String) + : ArmadilloException(cause = cause, message = "A critical playback issue occurred: $actionThatFailedMessage") { override val errorCode = 201 } diff --git a/Armadillo/src/main/java/com/scribd/armadillo/playback/ExoPlaybackExceptionExt.kt b/Armadillo/src/main/java/com/scribd/armadillo/playback/ExoPlaybackExceptionExt.kt index 7648402..41c5c70 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/playback/ExoPlaybackExceptionExt.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/playback/ExoPlaybackExceptionExt.kt @@ -27,7 +27,7 @@ internal fun ExoPlaybackException.toArmadilloException(): ArmadilloException { is SocketTimeoutException -> HttpResponseCodeException(0, null, source) is UnknownHostException -> HttpResponseCodeException(0, source.message, source) // Message is supposed to be the host for UnknownHostException - else -> ArmadilloIOException(cause = this, whatActionFailedMessage = "Exoplayer error.") + else -> ArmadilloIOException(cause = this, actionThatFailedMessage = "Exoplayer error.") } } } else if (TYPE_RENDERER == type) {