diff options
author | zaaarf <zaaarf@proton.me> | 2023-09-01 12:56:54 +0200 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-09-01 12:56:54 +0200 |
commit | b8cbf60f6601831a29ae7f302bced5871654dbc1 (patch) | |
tree | acf3883dc6d838ef3f3575c919a67830ab90da49 | |
parent | c75cd1f4d69d2e8bfcd620c7fd553d46ab07ddcb (diff) |
chore: throw exception if nto enough args are passed
-rw-r--r-- | src/main/java/ftbsc/lll/mapper/writer/impl/TinyV2Writer.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/writer/impl/TinyV2Writer.java b/src/main/java/ftbsc/lll/mapper/writer/impl/TinyV2Writer.java index 4649e3f..7269fa9 100644 --- a/src/main/java/ftbsc/lll/mapper/writer/impl/TinyV2Writer.java +++ b/src/main/java/ftbsc/lll/mapper/writer/impl/TinyV2Writer.java @@ -19,6 +19,8 @@ public class TinyV2Writer implements IWriter { @Override public void write(Mapper mapper, PrintWriter writer, String... args) { + if(args.length < 2) + throw new RuntimeException("Please provide the namespaces for the tiny format after the -a flag!"); writer.printf("tiny\t2\t0\t%s\t%s", args[0], args[1]); mapper.getRawMappings().forEach((name, data) -> { writer.printf("c\t%s\t%s\n", name, data.nameMapped); |