From f9da2ad531644617ad5a2cc6a1819d530e18ba22 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 14 Aug 2022 17:22:43 +0200 Subject: [PATCH] fix: show error message if cause is null --- src/main/kotlin/app/revanced/patcher/Patcher.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/Patcher.kt b/src/main/kotlin/app/revanced/patcher/Patcher.kt index 58ef8f8..c202dc6 100644 --- a/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -276,7 +276,8 @@ class Patcher(private val options: PatcherOptions) { if (result.isSuccess()) return@forEach - val errorMessage = result.error()!!.cause + val error = result.error()!! + val errorMessage = error.cause ?: error.message return PatchResultError("'$patchName' depends on '${patchDependency.patchName}' but the following error was raised: $errorMessage") }