chore: throw exception if nto enough args are passed

This commit is contained in:
zaaarf 2023-09-01 12:56:54 +02:00
parent c75cd1f4d6
commit b8cbf60f66
No known key found for this signature in database
GPG key ID: 6445A5CD15E5B40C

View file

@ -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);