mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-30 05:14:26 +02:00
fix: Print stack trace of exception
Otherwise the log will not include what originally raised the exception.
This commit is contained in:
parent
9fdb8f087f
commit
aa71146b1b
@ -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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user