Skip to content

Commit

Permalink
better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Dec 15, 2023
1 parent f9cd363 commit 9255266
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/rusefi/can/reader/CANLineReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ default List<CANPacket> skipHeaderAndRead(String fileName, final int skipCount)
public void accept(String s) {
if (index++ < skipCount)
return;
CANPacket packet = readLine(s, fileName);
CANPacket packet = readLine(s, fileName, index);
if (packet != null)
result.add(packet);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public CANPacket readLine(String line, String fileName, int lineIndex) {
return null;
String[] tokens = line.split("\\s+");
if (tokens.length < 2)
throw new IllegalStateException("Unexpected token count in [" + line + "]@" + lineIndex);
throw new IllegalStateException("Unexpected token count in " + fileName + "@" + lineIndex + ": [" + line + "]");
double timeStamp = Double.parseDouble(tokens[1]);

int sid = Integer.parseInt(tokens[3], 16);
Expand Down

0 comments on commit 9255266

Please sign in to comment.