diff options
| author | Keith Packard <keithp@keithp.com> | 2010-07-28 12:24:53 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-07-28 12:24:53 -0700 |
| commit | e76b9cc32bbcc5176d9bdd6f8d79778024627382 (patch) | |
| tree | 331a16ed7d14f8362dc85af04dcf1693b3b1ee6e /ao-tools/altosui/AltosUI.java | |
| parent | 172a2817dde6718724f2b5fad5a7761801446fa0 (diff) | |
altosui: Catch errors opening USB devices. Limit list to relevant devices
Avoids a segfault when failing to open a device. Limit listed telemetry
devices to just TeleDongle units.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosUI.java')
| -rw-r--r-- | ao-tools/altosui/AltosUI.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index 3dfc8952..5c92b9b4 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -493,8 +493,9 @@ public class AltosUI extends JFrame { run_display(thread); } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(AltosUI.this, - device.getPath(), - "Cannot open serial port", + String.format("Cannot open device \"%s\"", + device.getPath()), + "Cannot open target device", JOptionPane.ERROR_MESSAGE); } catch (IOException ee) { JOptionPane.showMessageDialog(AltosUI.this, |
