*/
package org.mxchange.addressbook.manager.contact;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.ArrayList;
import org.mxchange.jcore.contact.Gender;
import org.mxchange.jcore.exceptions.BadTokenException;
import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
+import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
import org.mxchange.jcore.manager.BaseManager;
/**
* a client instance.
*
* @param client Client instance to use
+ * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the database backend is not supported
+ * @throws java.sql.SQLException If an SQL error occurs
*/
- public AddressbookContactManager (final Client client) {
+ public AddressbookContactManager (final Client client) throws UnsupportedDatabaseBackendException, SQLException {
// Trace message
this.getLogger().trace(MessageFormat.format("client={1} - CALLED!", client)); //NOI18N
/**
* Shuts down this contact manager
+ *
+ * @throws java.sql.SQLException If an SQL error occurs
+ * @throws java.io.IOException If an IO error occurs
*/
@Override
- public void doShutdown () {
+ public void doShutdown () throws SQLException, IOException {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
this.getLogger().debug(MessageFormat.format("columnName={0}", columnName));
// Now get that column
- Object value = contact.getValueFromColumn(columnName);
+ Object value = null;
+ try {
+ value = contact.getValueFromColumn(columnName);
+ } catch (final IllegalArgumentException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+ this.abortProgramWithException(ex);
+ }
// Trace message
this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value));
try {
// Deligate this call to frontend
isAdded = this.getContactDatabase().isOwnContactFound();
- } catch (final SQLException ex) {
+ } catch (final SQLException | IOException | BadTokenException ex) {
// Something bad happened
this.abortProgramWithException(ex);
}