diff options
author | zaaarf <zaaarf@proton.me> | 2023-08-26 18:25:31 +0200 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-08-26 18:25:31 +0200 |
commit | f03bb3c932b035a94222cdd57b60ba1c77130585 (patch) | |
tree | 5e1a0e32a30a89b68a5c3156aef104d3d59dee43 /src/main/java/ftbsc/lll/exceptions | |
parent | 7898882bc5811e5f06e70bc2bb6925e114869a56 (diff) |
feat: added error handling and generally tweaked tsrg parsing
Diffstat (limited to 'src/main/java/ftbsc/lll/exceptions')
-rw-r--r-- | src/main/java/ftbsc/lll/exceptions/MalformedMappingsException.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/ftbsc/lll/exceptions/MalformedMappingsException.java b/src/main/java/ftbsc/lll/exceptions/MalformedMappingsException.java index 1352855..17bb3b5 100644 --- a/src/main/java/ftbsc/lll/exceptions/MalformedMappingsException.java +++ b/src/main/java/ftbsc/lll/exceptions/MalformedMappingsException.java @@ -1,7 +1,17 @@ package ftbsc.lll.exceptions; +/** + * Thrown when something goes wrong while parsing a mappings file. + */ public class MalformedMappingsException extends Exception { - public MalformedMappingsException(String mapping, String type) { - super(String.format("Unexpected token at line %s for mapper type %s!", mapping, type)); + + /** + * Constructs a new {@link MalformedMappingsException} given the line number + * and an error message. + * @param lineNumber the line the error occurred at + * @param error the error message + */ + public MalformedMappingsException(int lineNumber, String error) { + super(String.format("Unexpected token at line %d: %s!", lineNumber, error)); } } |