diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-25 14:15:59 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-25 14:15:59 +0100 |
commit | cc5ccde4c666589980eb717d2143e24ba0fde86d (patch) | |
tree | 5ae58ac9d28a1b419b77ba6b4e2e5d5adbcf0a06 /src/main/java | |
parent | ff29d43793b8ebee6c88f46c182e5a5ea6c51049 (diff) | |
download | skyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.tar.gz skyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.tar.bz2 skyhanni-cc5ccde4c666589980eb717d2143e24ba0fde86d.zip |
Show cause of error when NEU's ItemResolutionQuery fails.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 7 |
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() } |