From d51ec9fd6cde3ad393d4d0c91e30cc5d03945eaf Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Sat, 12 Feb 2022 09:21:09 +0200 Subject: More work on type registry/api --- .../shsupercm/fabric/citresewn/ex/CITParsingException.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java b/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java new file mode 100644 index 0000000..964b58d --- /dev/null +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java @@ -0,0 +1,13 @@ +package shcm.shsupercm.fabric.citresewn.ex; + +import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; + +public class CITParsingException extends Exception { + public CITParsingException(String message, PropertyGroup propertyGroup, int position) { + super("Errored while parsing CIT: " + descriptionOf(message, propertyGroup, position)); + } + + public static String descriptionOf(String message, PropertyGroup propertyGroup, int position) { + return message + " at " + position + " in " + propertyGroup.identifier.toString() + " from " + propertyGroup.packName; + } +} -- cgit