]> git.mxchange.org Git - jbonuscard-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java
Added and implemented missing methods
[jbonuscard-lib.git] / Addressbook / src / org / mxchange / addressbook / application / AddressbookApplication.java
index ea26bc1ec1bbe7117f389c6c3a2a0fcd9254202d..4be3359bdbe5fb7c6a7cbb6d3d62d55fdaed979b 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.addressbook.application;
 
 import java.io.IOException;
+import java.sql.SQLException;
 import java.text.MessageFormat;
 import org.mxchange.addressbook.BaseAddressbookSystem;
 import org.mxchange.addressbook.client.AddressbookClient;
@@ -241,7 +242,7 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
         * Shuts down the application.
         */
        @Override
-       public void doShutdown () {
+       public void doShutdown () throws SQLException, IOException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
                
@@ -337,6 +338,13 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
         */
        private void start (final String args[]) {
                this.getLogger().info("Program is started."); //NOI18N
+               try {
+                       // Init properties file
+                       this.initProperties();
+               } catch (final IOException ex) {
+                       // Something bad happened
+                       this.abortProgramWithException(ex);
+               }
 
                // Parse arguments
                this.parseArguments(args);
@@ -346,7 +354,11 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
 
                // Good bye, but this should not be reached ...
                this.getLogger().warn("Unusual exit reached."); //NOI18N
-               this.doShutdown();
+               try {
+                       this.doShutdown();
+               } catch (final SQLException | IOException ex) {
+                       this.abortProgramWithException(ex);
+               }
        }
 
        /**