From: Keith Packard Date: Tue, 3 Jun 2014 05:59:23 +0000 (-0700) Subject: telegps: Trap AltosConfigDataException in telegps config X-Git-Tag: 1.3.2.2~22 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=cd2179cb0d71749f3637cc3ee03ccc6adfd74aae telegps: Trap AltosConfigDataException in telegps config This was added for pyro configuration errors in AltosUI Signed-off-by: Keith Packard --- 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) {