From: Roland Haeder Date: Fri, 14 Aug 2015 19:45:54 +0000 (+0200) Subject: Added more thrown exceptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0b78586e6cb2c7d2d683718ee85f43d6d7b16e7a;p=pizzaservice-war.git Added more thrown exceptions Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index 68cf7220..c59185fe 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -545,7 +545,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of products return this.productFrontend.getAvailableProducts(); - } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException ex) { + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } } @@ -560,7 +560,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of products return this.productFrontend.getAllProducts(); - } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException ex) { + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } } @@ -575,7 +575,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of categories return this.categoryFrontend.getCategories(); - } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException ex) { + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } } @@ -997,7 +997,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED!", session, key)); //NOI18N // Init value - Object value = null; + Object value; // Get it synchronized from session synchronized (session) { @@ -1093,7 +1093,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @param title Title of category to check * @return Whether it has been found */ - private boolean isCategoryTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException { + private boolean isCategoryTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { // Delegate to frontend return this.categoryFrontend.isCategoryTitleUsed(title); } @@ -1103,7 +1103,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @param title Product title to check * @return Whether the product title has already been used */ - private boolean isProductTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException { + private boolean isProductTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { // Delegate to frontend return this.productFrontend.isProductTitleUsed(title); } @@ -1261,7 +1261,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P // Title already used throw new CategoryTitleAlreadyUsedException(request); } - } catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException ex) { + } catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } @@ -1355,7 +1355,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P // Title already used throw new ProductTitleAlreadyUsedException(request); } - } catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException ex) { + } catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); }