altosui: Report error message back from libaltos
[fw/altos] / altosui / AltosConfig.java
index 122ebeccf88d449800286f569a84026e962a5cfb..93def70daaad2e527616da648c4384187d152c95 100644 (file)
@@ -480,8 +480,7 @@ public class AltosConfig implements ActionListener {
                                }
                        } catch (FileNotFoundException ee) {
                                JOptionPane.showMessageDialog(owner,
-                                                             String.format("Cannot open device \"%s\"",
-                                                                           device.toShortString()),
+                                                             ee.getMessage(),
                                                              "Cannot open target device",
                                                              JOptionPane.ERROR_MESSAGE);
                        } catch (AltosSerialInUseException si) {