From 91cb2af9da0780bc179059728c4aef2b8b5949b0 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 12 Aug 2015 20:10:46 +0200 Subject: [PATCH] =?utf8?q?Added=20more=20thrown=20exceptions=20Signed-off-?= =?utf8?q?by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../addressbook/application/AddressbookApplication.java | 9 +++++++-- .../addressbook/client/console/ConsoleClient.java | 3 ++- .../org/mxchange/addressbook/client/gui/SwingClient.java | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) 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 -- 2.39.5