summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-02 22:59:23 -0700
committerKeith Packard <keithp@keithp.com>2014-06-02 22:59:23 -0700
commitcd2179cb0d71749f3637cc3ee03ccc6adfd74aae (patch)
tree1c0bccb6b6b861e31c514be24113c446c4c690d0
parent5e4087cd2fbb3ac67f90cd82edaa73c1eedbf67c (diff)
telegps: Trap AltosConfigDataException in telegps config
This was added for pyro configuration errors in AltosUI Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--telegps/TeleGPSConfig.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/telegps/TeleGPSConfig.java b/telegps/TeleGPSConfig.java
index ffb2d612..22e6a3ac 100644
--- a/telegps/TeleGPSConfig.java
+++ b/telegps/TeleGPSConfig.java
@@ -234,9 +234,15 @@ public class TeleGPSConfig implements ActionListener {
/* Pull data out of the UI and stuff back into our local data record */
- data.get_values(config_ui);
-
- run_serial_thread(serial_mode_save);
+ try {
+ data.get_values(config_ui);
+ run_serial_thread(serial_mode_save);
+ } catch (AltosConfigDataException ae) {
+ JOptionPane.showMessageDialog(owner,
+ ae.getMessage(),
+ "Configuration Data Error",
+ JOptionPane.ERROR_MESSAGE);
+ }
}
public void actionPerformed(ActionEvent e) {