From 562838e0d6ae597c06122efb5db2a68d2e633cf2 Mon Sep 17 00:00:00 2001 From: Felix Kehrer Date: Fri, 25 May 2018 20:40:02 +0200 Subject: removed logging for exceptions which will be logged in service #27033 --- .../groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java index 13f2c0f..59f8e52 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java @@ -51,7 +51,6 @@ public class RegistrationDatabaseDAO implements RegistrationDAO { updateVehicle = connection.prepareStatement(UPDATE_VEHICLE); fetchRegistrations = connection.prepareStatement(FETCH_REGISTRATIONS); } catch (SQLException e) { - LOG.error("Could not get connection or preparation of statement failed"); throw new PersistenceException(e); } } @@ -74,7 +73,6 @@ public class RegistrationDatabaseDAO implements RegistrationDAO { if (rs.next()) { returnValues.add(rs.getLong(1)); } else { - LOG.error("No ResultSet was created while adding registration"); throw new PersistenceException( "Anmeldung konnte nicht gespeichert werden."); } @@ -87,14 +85,10 @@ public class RegistrationDatabaseDAO implements RegistrationDAO { connection.commit(); return returnValues; } catch (SQLException e) { - LOG.error( - "An SQLException occurred while trying to save registrations to database. " - + "Attempting a rollback. Error message: {}", - e.getMessage()); try { connection.rollback(); } catch (SQLException e1) { - LOG.error("Rollback failed :("); + LOG.error("Rollback failed! Error message: {}", e.getMessage()); } throw new PersistenceException(e); } finally { -- cgit v1.2.3-70-g09d2