]> git.mxchange.org Git - addressbook-swing.git/blobdiff - Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
More rewrites for thrown exceptions
[addressbook-swing.git] / Addressbook / src / org / mxchange / addressbook / client / gui / AddressbookFrame.java
index 8661516a33c291bb518c748640fc96a2fb212853..4bdb6e98baecf355f982dea847539d6225b190ef 100644 (file)
@@ -54,6 +54,7 @@ import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.client.gui.ClientFrame;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.Gender;
+import org.mxchange.jcore.exceptions.BadTokenException;
 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
 import org.mxchange.jcore.model.swing.contact.ContactTableModel;
 
@@ -209,7 +210,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         * @param client Client instance
         */
        @Override
-       public void setupFrame (final Client client) {
+       public void setupFrame (final Client client) throws IOException, BadTokenException {
                // Debug line
                this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
 
@@ -682,6 +683,9 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                                        // Already added, log away
                                        // @TODO maybe output message here?
                                        self.logException(ex);
+                               } catch (final IOException | BadTokenException ex) {
+                                       // Somethind bad happened here
+                                       // @TODO Output error message here?
                                }
                        }
                });
@@ -702,7 +706,11 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                        @Override
                        public void actionPerformed (final ActionEvent e) {
                                ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
-                               manager.doChangeOwnData();
+                               try {
+                                       manager.doChangeOwnData();
+                               } catch (final IOException | BadTokenException ex) {
+                                       self.logException(ex);
+                               }
                        }
                });