aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java
index 4c71414..497c6bc 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java
@@ -85,14 +85,11 @@ public class OperationServiceImpl implements OperationService {
.status(Status.ACTIVE)
.build());
} catch (PersistenceException e) {
- LOG.error("PersistenceException while adding Operation. Message: {}", e.getMessage());
throw new ServiceException(e);
} catch (InvalidVehicleException e) {
// already logged as invalid vehicle
throw new InvalidOperationException("Enthaltenes Fahrzeug ist ungültig", e);
} catch (ElementNotFoundException e) {
- LOG.error(
- "ElementNotFoundException while adding Operation. Message: {}", e.getMessage());
throw new InvalidOperationException("Enthaltenes Fahrzeug existiert nicht", e);
}
}
@@ -142,7 +139,6 @@ public class OperationServiceImpl implements OperationService {
vs.add(v);
} catch (ElementNotFoundException e) {
- LOG.info("Invalid Vehicle: VehicleId is not valid");
throw new InvalidVehicleException("VehicleId ist invalid");
}
}
@@ -152,13 +148,8 @@ public class OperationServiceImpl implements OperationService {
operationDAO.update(o.toBuilder().vehicles(vs).build());
} catch (ElementNotFoundException e) {
- LOG.error(
- "ElementNotFoundException while requesting Vehicles. Message: {}",
- e.getMessage());
throw new InvalidOperationException("Kein Einsatz mit dieser ID existiert");
} catch (PersistenceException e) {
- LOG.error(
- "PersistenceException while requesting vehicles. Message: {}", e.getMessage());
throw new ServiceException(e);
}
}
@@ -170,13 +161,8 @@ public class OperationServiceImpl implements OperationService {
Operation o = operationDAO.get(operationId);
operationDAO.update(o.toBuilder().status(status).build());
} catch (ElementNotFoundException e) {
- LOG.error(
- "ElementNotFoundException while completing operation. Message: {}",
- e.getMessage());
throw new InvalidOperationException(e);
} catch (PersistenceException e) {
- LOG.error(
- "PersistenceException while completing operation. Message: {}", e.getMessage());
throw new ServiceException(e);
}
}
@@ -251,11 +237,9 @@ public class OperationServiceImpl implements OperationService {
return operations;
} catch (PersistenceException e) {
- LOG.error("PersistenceException while listing operations. Message: {}", e);
throw new ServiceException(e);
} catch (InvalidOperationException e) {
// database returned invalid values
- LOG.error("DB returned invalid operation. Message: {}", e.getMessage());
throw new ServiceException("DB returned invalid operation", e);
}
}
@@ -271,7 +255,6 @@ public class OperationServiceImpl implements OperationService {
try {
VehicleServiceImpl.validateVehicle(v);
} catch (InvalidVehicleException e) {
- LOG.info("Invalid Operation: Vehicle \"{}\" is invalid", v.name());
throw new InvalidOperationException("Fahrzeug " + v.name() + " ist invalid" + e);
}