altosui: Report error message back from libaltos
[fw/altos] / altosui / AltosIgniteUI.java
index c11a86145ce1a68b0d8768cfa75a920469f25272..b215c22865604fd0631109e5b03b6ecd8000f6df 100644 (file)
@@ -122,8 +122,7 @@ public class AltosIgniteUI
        void ignite_exception(Exception e) {
                if (e instanceof FileNotFoundException) {
                        JOptionPane.showMessageDialog(owner,
-                                                     String.format("Cannot open device \"%s\"",
-                                                                   device.toShortString()),
+                                                     ((FileNotFoundException) e).getMessage(),
                                                      "Cannot open target device",
                                                      JOptionPane.ERROR_MESSAGE);
                } else if (e instanceof AltosSerialInUseException) {