Skip to content

Commit

Permalink
fix: show error message instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 1, 2022
1 parent 9a4d30e commit 8d95b14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/app/revanced/patcher/Patcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ class Patcher(private val options: PatcherOptions) {
val result = applyPatch(dependency, appliedPatches)
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 '${dependency.patchName}' but the following error was raised: $errorMessage")
}

Expand Down

0 comments on commit 8d95b14

Please sign in to comment.