projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Report error message back from libaltos
[fw/altos]
/
altosui
/
AltosScanUI.java
diff --git
a/altosui/AltosScanUI.java
b/altosui/AltosScanUI.java
index bce4b32c9ef02e19db030e33eb77a5e5a2558005..df5c51d4a2e3ab74d98dd9ad7b0a7bd7fe9bd1f8 100644
(file)
--- a/
altosui/AltosScanUI.java
+++ b/
altosui/AltosScanUI.java
@@
-130,8
+130,7
@@
public class AltosScanUI
void scan_exception(Exception e) {
if (e instanceof FileNotFoundException) {
JOptionPane.showMessageDialog(owner,
void scan_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) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof AltosSerialInUseException) {
@@
-326,8
+325,7
@@
public class AltosScanUI
return true;
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(owner,
return true;
} 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) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {