altosui: Display error message when parsing pyro channel values fails
[fw/altos] / altosui / AltosConfig.java
index 3128114f265bf4a7d19eff45fc36134c44b03b67..2cf69525fea1e468d5ab40a502b224d9c64530bd 100644 (file)
@@ -242,9 +242,15 @@ public class AltosConfig 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) {
@@ -298,4 +304,4 @@ public class AltosConfig implements ActionListener {
                        }
                }
        }
-}
\ No newline at end of file
+}