aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDatabaseDAO.java8
1 files changed, 1 insertions, 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 {