Skip to content

Commit

Permalink
cleaner error message for invalid slots, fixes #2042
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 21, 2019
1 parent 55f09b3 commit 5c440db
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ public void execute(final ScriptEntry scriptEntry) {
}

int slotId = SlotHelper.nameToIndex(slot.asString());
if (slotId == -1) {
Debug.echoError(scriptEntry.getResidingQueue(), "The input '" + slot.asString() + "' is not a valid slot!");
if (slotId < 0) {
if (slotId == -1) {
Debug.echoError(scriptEntry.getResidingQueue(), "The input '" + slot.asString() + "' is not a valid slot (unrecognized)!");
}
else {
Debug.echoError(scriptEntry.getResidingQueue(), "The input '" + slot.asString() + "' is not a valid slot (negative values are invalid)!");
}
return;
}

Expand Down

0 comments on commit 5c440db

Please sign in to comment.