Skip to content

Commit c9a8260

Browse files
committed
fix: Use Patch#toString to get patch class name, when no name available
1 parent 9fc42e1 commit c9a8260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/app/revanced/patcher/Patcher.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class Patcher(
140140
patch: Patch<*>,
141141
executedPatches: LinkedHashMap<Patch<*>, PatchResult>,
142142
): PatchResult {
143-
val patchName = patch.name ?: patch.toString()
143+
val patchName = patch.toString()
144144

145145
executedPatches[patch]?.let { patchResult ->
146146
patchResult.exception ?: return patchResult
@@ -237,7 +237,7 @@ class Patcher(
237237
PatchResult(
238238
patch,
239239
PatchException(
240-
"'${patch.name}' raised an exception while being closed: ${it.stackTraceToString()}",
240+
"'$patch' raised an exception while being closed: ${it.stackTraceToString()}",
241241
result.exception,
242242
),
243243
),

0 commit comments

Comments
 (0)