fix: Log the correct patch names

This commit is contained in:
oSumAtrIX 2023-09-13 03:35:39 +02:00
parent 670f0153de
commit 9fdb8f087f
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -153,7 +153,7 @@ class Patcher(
patch: Patch<*>, patch: Patch<*>,
executedPatches: LinkedHashMap<Patch<*>, PatchResult> executedPatches: LinkedHashMap<Patch<*>, PatchResult>
): PatchResult { ): PatchResult {
val patchName = patch.name val patchName = patch.name ?: patch.toString()
executedPatches[patch]?.let { patchResult -> executedPatches[patch]?.let { patchResult ->
patchResult.exception ?: return patchResult patchResult.exception ?: return patchResult
@ -171,7 +171,7 @@ class Patcher(
result.exception?.let { result.exception?.let {
return PatchResult( return PatchResult(
patch, patch,
PatchException("'$patchName' depends on '${dependency.name}' that raised an exception: $it") PatchException("'$patchName' depends on '${dependency.name ?: dependency}' that raised an exception:\n$it")
) )
} }
} }