Skip to content

Commit

Permalink
fix: print full exception when patch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Dec 18, 2022
1 parent 88bb3a8 commit 7cf79e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/app/revanced/patcher/Patcher.kt
Expand Up @@ -399,9 +399,10 @@ class Patcher(private val options: PatcherOptions) {
val result = executePatch(dependency, executedPatches)
if (result.isSuccess()) return@forEach

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

val isResourcePatch = ResourcePatch::class.java.isAssignableFrom(patchClass)
Expand Down

0 comments on commit 7cf79e6

Please sign in to comment.