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 f50c32e..fa25990 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)