altosui: Report error message back from libaltos
[fw/altos] / altosui / AltosLaunchUI.java
index 4e630afb11045477fff135c42d32f19bc16f51c0..47365e03bd46a19bc933553d55beac501e3effd9 100644 (file)
@@ -164,8 +164,7 @@ public class AltosLaunchUI
        void launch_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) {