check for errors

This commit is contained in:
rusefillc 2024-03-22 14:08:47 -04:00
parent ba11705db0
commit dc4ec93dc5
1 changed files with 4 additions and 1 deletions

View File

@ -98,8 +98,11 @@ public class DbcFile {
}
private void purgePacket(DbcPacket currentPacket) {
if (currentPacket != null)
if (currentPacket != null) {
if (packets.containsKey(currentPacket.getId()))
throw new IllegalStateException("We already have " + packets.get(currentPacket.getId()).getName() + " for " + currentPacket.getId());
packets.put(currentPacket.getId(), currentPacket);
}
}
public static String replaceSpecialWithSpaces(String line) {