From: Roland Haeder Date: Fri, 14 Aug 2015 19:31:49 +0000 (+0200) Subject: Also added here missing thrown exceptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a0b5d7b4527c85fe6a338f7eb147a17ea3c9a372;p=jbonuscard-lib.git Also added here missing thrown exceptions Signed-off-by:Roland Häder --- diff --git a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java index cc08842..48f8bbe 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java @@ -17,6 +17,7 @@ package org.mxchange.addressbook.database.frontend.contact; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import java.text.MessageFormat; import java.util.Iterator; @@ -34,6 +35,7 @@ import org.mxchange.jcore.database.frontend.BaseDatabaseFrontend; import org.mxchange.jcore.database.result.Result; import org.mxchange.jcore.database.storage.Storeable; import org.mxchange.jcore.exceptions.BadTokenException; +import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException; /** @@ -233,11 +235,14 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp * Checks whether own contact is found in database * * @return Whether own contact is found - * @throws java.io.IOException If any IO error occurs - * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found + * @throws org.mxchange.jcore.exceptions.BadTokenException Continued throw + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ @Override - public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException { + public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Get search criteria instance SearchableCritera critera = new SearchCriteria(); diff --git a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java index 9e7e83f..213575e 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java @@ -17,11 +17,13 @@ package org.mxchange.addressbook.database.frontend.contact; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException; import org.mxchange.jcore.contact.Contact; import org.mxchange.jcore.database.frontend.DatabaseFrontend; import org.mxchange.jcore.exceptions.BadTokenException; +import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; /** * An interface for addressbook contact database frontends @@ -51,9 +53,15 @@ public interface AddressbookContactFrontend extends DatabaseFrontend { * * @param contact Contact instance to check * @return Whether the given Contact instance is found + * @throws java.sql.SQLException If an SQL error occurs + * @throws java.io.IOException If an IO error occurs * @throws org.mxchange.jcore.exceptions.BadTokenException Continued throw + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - public boolean isContactFound (final Contact contact) throws BadTokenException; + public boolean isContactFound (final Contact contact) throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; /** * Some "getter" for own contact instance @@ -69,8 +77,12 @@ public interface AddressbookContactFrontend extends DatabaseFrontend { * @throws java.sql.SQLException If any SQL error occurs * @throws java.io.IOException If an IO error occurs * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException; + public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; /** * Reads a single row and parses it to a contact instance