mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-29 21:04: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.
|
||||
patch.dependencies?.forEach { dependencyName ->
|
||||
val dependency = context.allPatches[dependencyName]!!
|
||||
patch.dependencies?.forEach { dependencyClass ->
|
||||
val dependency = context.allPatches[dependencyClass]!!
|
||||
val result = executePatch(dependency, executedPatches)
|
||||
|
||||
result.exception?.let {
|
||||
return PatchResult(
|
||||
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(
|
||||
patch,
|
||||
PatchException(
|
||||
"'${patch.name}' raised an exception while being closed: $it",
|
||||
"'${patch.name}' raised an exception while being closed: ${it.stackTraceToString()}",
|
||||
result.exception
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user