Skip to content

Commit

Permalink
fix: show error message if cause is null
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 14, 2022
1 parent b19e113 commit f9da2ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/app/revanced/patcher/Patcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ class Patcher(private val options: PatcherOptions) {

if (result.isSuccess()) return@forEach

val errorMessage = result.error()!!.cause
val error = result.error()!!
val errorMessage = error.cause ?: error.message
return PatchResultError("'$patchName' depends on '${patchDependency.patchName}' but the following error was raised: $errorMessage")
}

Expand Down

0 comments on commit f9da2ad

Please sign in to comment.