aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-25 14:15:59 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-25 14:15:59 +0100
commitcc5ccde4c666589980eb717d2143e24ba0fde86d (patch)
tree5ae58ac9d28a1b419b77ba6b4e2e5d5adbcf0a06 /src/main
parentff29d43793b8ebee6c88f46c182e5a5ea6c51049 (diff)
downloadskyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.tar.gz
skyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.tar.bz2
skyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.zip
Show cause of error when NEU's ItemResolutionQuery fails.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index d22a82759..0f7a15618 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -35,7 +35,12 @@ object NEUItems {
val itemStack = ItemResolutionQuery(manager)
.withKnownInternalName(internalName)
- .resolveToItemStack()!!
+ .resolveToItemStack()
+ if (itemStack == null) {
+ val error = "ItemResolutionQuery returns null for internalName $internalName"
+ LorenzUtils.error(error)
+ throw RuntimeException(error)
+ }
itemCache[internalName] = itemStack
return itemStack.copy()
}