Make syntax errors in telem files just skip the current line and move
on to the next one instead of abandoning the whole file.
Signed-off-by: Keith Packard <keithp@keithp.com>
try {
for (;;) {
String line = AltosRecord.gets(input);
try {
for (;;) {
String line = AltosRecord.gets(input);
- AltosTelemetry record = new AltosTelemetry(line);
- if (record == null)
- break;
- if (!saw_boost && record.state >= Altos.ao_flight_boost)
- {
- saw_boost = true;
- boost_tick = record.tick;
+ try {
+ AltosTelemetry record = new AltosTelemetry(line);
+ if (record == null)
+ break;
+ if (!saw_boost && record.state >= Altos.ao_flight_boost)
+ {
+ saw_boost = true;
+ boost_tick = record.tick;
+ }
+ records.add(record);
+ } catch (ParseException pe) {
+ System.out.printf("parse exception %s\n", pe.getMessage());
+ }
}
} catch (IOException io) {
}
} catch (IOException io) {
- } catch (ParseException pe) {
+ System.out.printf("io exception\n");
}
record_iterator = records.iterator();
try {
}
record_iterator = records.iterator();
try {