diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-03-05 08:25:26 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-03-05 08:25:26 +0200 |
commit | 2aeadc2dd30c23aac6bb1d0a349720f28f2609ec (patch) | |
tree | fb535340c46663fede91f8345131875d7872b17a /src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java | |
parent | b8b6fff68c3f24a1f4df9de0ea4170cfc3b0f619 (diff) | |
download | CITResewn-2aeadc2dd30c23aac6bb1d0a349720f28f2609ec.tar.gz CITResewn-2aeadc2dd30c23aac6bb1d0a349720f28f2609ec.tar.bz2 CITResewn-2aeadc2dd30c23aac6bb1d0a349720f28f2609ec.zip |
Documentation (18/44, 0/35)
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java b/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java index 811d16b..f897ba7 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/ex/CITParsingException.java @@ -2,16 +2,16 @@ package shcm.shsupercm.fabric.citresewn.ex; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; +/** + * Thrown if errored while parsing the properties of a {@link PropertyGroup}. + * @see PropertyGroup#messageWithDescriptorOf(String, int) + */ public class CITParsingException extends Exception { public CITParsingException(String message, PropertyGroup propertyGroup, int position, Throwable throwable) { - super("Errored while parsing CIT: " + descriptionOf(message, propertyGroup, position), throwable); + super("Errored while parsing CIT: " + propertyGroup.messageWithDescriptorOf(message, position), throwable); } 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 + (position != -1 ? " @L" + position : "") + " in " + propertyGroup.identifier.toString() + " from " + propertyGroup.packName; + super("Errored while parsing CIT: " + propertyGroup.messageWithDescriptorOf(message, position)); } } |