altosui: Print filename before attempting to parse in --summary mode
authorKeith Packard <keithp@keithp.com>
Fri, 17 Jun 2016 15:27:12 +0000 (08:27 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 17 Jun 2016 15:27:12 +0000 (08:27 -0700)
Any problems handling the file are easier to debug if the filename is
visible above the error message.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosUI.java

index f50c32e3d38127d2e98e307f85dfa6e449bd56ce..fa259906769a9da7101c9bf1c064ce43a21bab93 100644 (file)
@@ -492,8 +492,8 @@ public class AltosUI extends AltosUIFrame {
                if (states == null)
                        return false;
                try {
-                       AltosFlightStats stats = new AltosFlightStats(states);
                        System.out.printf("%s:\n", file.toString());
+                       AltosFlightStats stats = new AltosFlightStats(states);
                        if (stats.serial != AltosLib.MISSING)
                                System.out.printf("Serial:       %5d\n", stats.serial);
                        if (stats.flight != AltosLib.MISSING)