altosui: Report error message back from libaltos
[fw/altos] / altosui / AltosFlashUI.java
index 3874b5004995cb0269a612005b2949783f2747de..3956ff20a94789d99148df23fdda1455e9aa0beb 100644 (file)
@@ -200,8 +200,8 @@ public class AltosFlashUI
        void exception (Exception e) {
                if (e instanceof FileNotFoundException) {
                        JOptionPane.showMessageDialog(frame,
-                                                     "Cannot open image",
-                                                     file.toString(),
+                                                     ((FileNotFoundException) e).getMessage(),
+                                                     "Cannot open file",
                                                      JOptionPane.ERROR_MESSAGE);
                } else if (e instanceof AltosSerialInUseException) {
                        JOptionPane.showMessageDialog(frame,