mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-11 13:56:16 +00:00
fix: Print stack trace of exception
Otherwise the log will not include what originally raised the exception.
This commit is contained in:
@@ -164,14 +164,17 @@ class Patcher(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recursively execute all dependency patches.
|
// Recursively execute all dependency patches.
|
||||||
patch.dependencies?.forEach { dependencyName ->
|
patch.dependencies?.forEach { dependencyClass ->
|
||||||
val dependency = context.allPatches[dependencyName]!!
|
val dependency = context.allPatches[dependencyClass]!!
|
||||||
val result = executePatch(dependency, executedPatches)
|
val result = executePatch(dependency, executedPatches)
|
||||||
|
|
||||||
result.exception?.let {
|
result.exception?.let {
|
||||||
return PatchResult(
|
return PatchResult(
|
||||||
patch,
|
patch,
|
||||||
PatchException("'$patchName' depends on '${dependency.name ?: dependency}' that raised an exception:\n$it")
|
PatchException(
|
||||||
|
"'$patchName' depends on '${dependency.name ?: dependency}' " +
|
||||||
|
"that raised an exception:\n${it.stackTraceToString()}"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -245,7 +248,7 @@ class Patcher(
|
|||||||
PatchResult(
|
PatchResult(
|
||||||
patch,
|
patch,
|
||||||
PatchException(
|
PatchException(
|
||||||
"'${patch.name}' raised an exception while being closed: $it",
|
"'${patch.name}' raised an exception while being closed: ${it.stackTraceToString()}",
|
||||||
result.exception
|
result.exception
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user