]> git.mxchange.org Git - jaddressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/client/console/ConsoleClient.java
Fixes for missing throws statements (because jcore has changed).
[jaddressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / client / console / ConsoleClient.java
index 8a7bececed03fda5851e44b92d0a7a139cfb8983..176418b4f38849891d7cf7936bf4a40a467dff13 100644 (file)
  */
 package org.mxchange.addressbook.client.console;
 
+import java.sql.SQLException;
 import java.text.MessageFormat;
 import java.util.Arrays;
 import java.util.Scanner;
 import org.mxchange.addressbook.application.AddressbookApplication;
 import org.mxchange.addressbook.client.AddressbookClient;
 import org.mxchange.addressbook.client.BaseAddressbookClient;
-import org.mxchange.jcore.contact.Contact;
-import org.mxchange.jcore.contact.Gender;
 import org.mxchange.addressbook.contact.user.UserContact;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
 import org.mxchange.addressbook.manager.contact.ManageableAddressbookContact;
@@ -33,7 +32,10 @@ import org.mxchange.addressbook.menu.console.ConsoleMenu;
 import org.mxchange.addressbook.menu.item.SelectableMenuItem;
 import org.mxchange.addressbook.menu.item.console.ConsoleMenuItem;
 import org.mxchange.jcore.application.Application;
+import org.mxchange.jcore.contact.Contact;
+import org.mxchange.jcore.contact.Gender;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
+import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 
 /**
  * A client for the console
@@ -548,7 +550,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
        }
 
        /**
-        * Inizializes this client
+        * Initializes this client
         */
        @Override
        public void init () {
@@ -556,7 +558,12 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace("CALLED!"); //NOI18N
 
                // Init contact manager here
-               this.initContactManager();
+               try {
+                       this.initContactManager();
+               } catch (final UnsupportedDatabaseBackendException | SQLException ex) {
+                       // End here
+                       this.abortProgramWithException(ex);
+               }
 
                // Fill menu map
                this.fillMenuMap();