From: Roland Haeder Date: Wed, 12 Aug 2015 18:10:46 +0000 (+0200) Subject: Added more thrown exceptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=91cb2af9da0780bc179059728c4aef2b8b5949b0;p=addressbook-lib.git Added more thrown exceptions Signed-off-by:Roland Häder --- diff --git a/Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java b/Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java index ea26bc1..e4ac7a9 100644 --- a/Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java +++ b/Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java @@ -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 @@ -346,7 +347,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); + } } /** diff --git a/Addressbook/src/org/mxchange/addressbook/client/console/ConsoleClient.java b/Addressbook/src/org/mxchange/addressbook/client/console/ConsoleClient.java index 176418b..04f7037 100644 --- a/Addressbook/src/org/mxchange/addressbook/client/console/ConsoleClient.java +++ b/Addressbook/src/org/mxchange/addressbook/client/console/ConsoleClient.java @@ -16,6 +16,7 @@ */ package org.mxchange.addressbook.client.console; +import java.io.IOException; import java.sql.SQLException; import java.text.MessageFormat; import java.util.Arrays; @@ -314,7 +315,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC * Shutdown this client */ @Override - public void doShutdown () { + public void doShutdown () throws SQLException, IOException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N diff --git a/Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java b/Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java index 8a27f24..2ad4ae2 100644 --- a/Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java +++ b/Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java @@ -16,6 +16,7 @@ */ package org.mxchange.addressbook.client.gui; +import java.io.IOException; import java.sql.SQLException; import org.mxchange.addressbook.client.AddressbookClient; import org.mxchange.addressbook.client.BaseAddressbookClient; @@ -107,7 +108,7 @@ public class SwingClient extends BaseAddressbookClient implements AddressbookCli * Shuts down this client */ @Override - public void doShutdown () { + public void doShutdown () throws SQLException, IOException { // Debug message this.getLogger().trace("CALLED!"); //NOI18N