Add exception hierarchy

This commit is contained in:
altrisi committed 2021-02-21 00:57:37 +01:00
1 parent a155494d11
commit 86dabe0080
13 files changed
+216 -74

No files matched your search

@@ -5,6 +5,7 @@ import carpet.script.CarpetContext;
import carpet.script.LazyValue;
import carpet.script.exception.InternalExpressionException;
import carpet.script.exception.ThrowStatement;
import carpet.script.exception.Throwables;
import carpet.script.utils.EquipmentInventory;
import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
@@ -298,7 +299,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
}
catch (CommandSyntaxException e)
{
throw new ThrowStatement("Incorrect item: "+itemString, ThrowStatement.UNKNOWN_ITEM);
throw new ThrowStatement("Incorrect item: "+itemString, Throwables.UNKNOWN_ITEM);
}
}