]> git.mxchange.org Git - jaddressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java
Fixes for missing throws statements (because jcore has changed).
[jaddressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / application / AddressbookApplication.java
index c14c64fa8e1ce3339a00542fe161918a963bbc9a..ea26bc1ec1bbe7117f389c6c3a2a0fcd9254202d 100644 (file)
  */
 package org.mxchange.addressbook.application;
 
+import java.io.IOException;
 import java.text.MessageFormat;
 import org.mxchange.addressbook.BaseAddressbookSystem;
 import org.mxchange.addressbook.client.AddressbookClient;
 import org.mxchange.addressbook.client.console.ConsoleClient;
 import org.mxchange.addressbook.client.gui.SwingClient;
+import org.mxchange.jcore.BaseFrameworkSystem;
 import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
@@ -140,9 +142,13 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
 
        /**
         * Protected constructor
+        * @throws java.io.IOException If any IO error occurs
         */
-       protected AddressbookApplication () {
-               // Always init i18n bundle in this application
+       protected AddressbookApplication () throws IOException {
+               // Init properties file
+               this.initProperties();
+
+               // Init bundle
                this.initBundle();
        }
 
@@ -349,8 +355,14 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
         * @param args the command line arguments
         */
        public static void main (String[] args) {
-               // Start application
-               new AddressbookApplication().start(args);
+               try {
+                       // Start application
+                       new AddressbookApplication().start(args);
+               } catch (final IOException ex) {
+                       // Get instance
+                       BaseFrameworkSystem.getInstance().getLogger().catching(ex);
+                       System.exit(1);
+               }
        }
 
        /**