better error handling
This commit is contained in:
parent
ce7e635291
commit
4ff0333d1b
|
@ -29,9 +29,12 @@ public class DbcField {
|
||||||
return null;
|
return null;
|
||||||
String name = tokens[1];
|
String name = tokens[1];
|
||||||
int index = 1;
|
int index = 1;
|
||||||
while (!tokens[index - 1].equals(":"))
|
try {
|
||||||
index++;
|
while (!tokens[index - 1].equals(":"))
|
||||||
|
index++;
|
||||||
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||||||
|
throw new IllegalStateException("While parsing [" + line + "]", e);
|
||||||
|
}
|
||||||
|
|
||||||
if (DbcFile.debugEnabled)
|
if (DbcFile.debugEnabled)
|
||||||
System.out.println(line);
|
System.out.println(line);
|
||||||
|
|
Loading…
Reference in New Issue