better error handling

This commit is contained in:
rusefillc 2024-03-23 12:20:33 -04:00
parent ce7e635291
commit 4ff0333d1b
1 changed files with 6 additions and 3 deletions

View File

@ -29,9 +29,12 @@ public class DbcField {
return null;
String name = tokens[1];
int index = 1;
while (!tokens[index - 1].equals(":"))
index++;
try {
while (!tokens[index - 1].equals(":"))
index++;
} catch (ArrayIndexOutOfBoundsException e) {
throw new IllegalStateException("While parsing [" + line + "]", e);
}
if (DbcFile.debugEnabled)
System.out.println(line);