diff --git a/src/main/java/fr/femto/extractor/track/Main.java b/src/main/java/fr/femto/extractor/track/Main.java index 9805b87..22cec0d 100644 --- a/src/main/java/fr/femto/extractor/track/Main.java +++ b/src/main/java/fr/femto/extractor/track/Main.java @@ -167,9 +167,13 @@ public class Main { String currentMessage = bufferedReader.readLine(); while (currentMessage != null) { if (!currentMessage.isEmpty()) { - final long timestamp = parseLong(currentMessage.substring(3).split(",")[0]); - if (lowerTimestamp <= timestamp && timestamp <= upperTimestamp) { - bufferedWriter.write(currentMessage + "\n"); + try { + final long timestamp = parseLong(currentMessage.substring(3).split(",")[0]); + if (lowerTimestamp <= timestamp && timestamp <= upperTimestamp) { + bufferedWriter.write(currentMessage + "\n"); + } + } catch (final Exception ignored) { + } } currentMessage = bufferedReader.readLine();