mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-11 13:56:16 +00:00
fix: Use Patch#toString to get patch class name, when no name available
This commit is contained in:
@@ -140,7 +140,7 @@ class Patcher(
|
|||||||
patch: Patch<*>,
|
patch: Patch<*>,
|
||||||
executedPatches: LinkedHashMap<Patch<*>, PatchResult>,
|
executedPatches: LinkedHashMap<Patch<*>, PatchResult>,
|
||||||
): PatchResult {
|
): PatchResult {
|
||||||
val patchName = patch.name ?: patch.toString()
|
val patchName = patch.toString()
|
||||||
|
|
||||||
executedPatches[patch]?.let { patchResult ->
|
executedPatches[patch]?.let { patchResult ->
|
||||||
patchResult.exception ?: return patchResult
|
patchResult.exception ?: return patchResult
|
||||||
@@ -237,7 +237,7 @@ class Patcher(
|
|||||||
PatchResult(
|
PatchResult(
|
||||||
patch,
|
patch,
|
||||||
PatchException(
|
PatchException(
|
||||||
"'${patch.name}' raised an exception while being closed: ${it.stackTraceToString()}",
|
"'$patch' raised an exception while being closed: ${it.stackTraceToString()}",
|
||||||
result.exception,
|
result.exception,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user