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/VehicleDatabaseDao.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/VehicleDatabaseDao.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/VehicleDatabaseDao.java
index 8af5bf4..b2d253a 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/VehicleDatabaseDao.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/VehicleDatabaseDao.java
@@ -150,7 +150,13 @@ public class VehicleDatabaseDao implements VehicleDAO {
p.executeUpdate();
} catch (SQLException e) {
- e.printStackTrace();
+ throw new PersistenceException("SQL Excpetion : " + e.toString());
+ } finally {
+ try {
+ p.close();
+ } catch (SQLException e) {
+ throw new PersistenceException("SQL Excpetion : " + e.toString());
+ }
}
}