aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kehrer <felix.kehrer@gmail.com>2018-06-15 14:06:27 +0200
committerTharre <tharre3@gmail.com>2018-06-16 17:39:48 +0200
commit826d46ba36707fc7ba630848326295761a555a76 (patch)
tree7335eb0fc4659d131f911fbabf5ddf8b7c66cf6d
parentb6a29ddc6965976d31f8ce08b843770b41936e0b (diff)
downloadsepm-groupproject-826d46ba36707fc7ba630848326295761a555a76.tar.gz
sepm-groupproject-826d46ba36707fc7ba630848326295761a555a76.tar.xz
sepm-groupproject-826d46ba36707fc7ba630848326295761a555a76.zip
Added/Changed logging of caught Exceptions #27033
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java
index edc56e7..d1c31f3 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java
@@ -11,7 +11,6 @@ import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidVehicleException
import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException;
import at.ac.tuwien.sepm.assignment.groupphase.util.SpringFXMLLoader;
import java.io.IOException;
-import java.lang.invoke.MethodHandles;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -47,7 +46,7 @@ import org.springframework.stereotype.Controller;
@Controller
public class CreateOperationController {
- private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+ private static final Logger LOG = LoggerFactory.getLogger(CreateOperationController.class);
public AnchorPane apCreateOperation;
@FXML private GridPane grdWindowContainer;
@@ -174,7 +173,7 @@ public class CreateOperationController {
fpVehicles.getChildren().add(controller.getRootElement());
}
} catch (ServiceException | IOException | InvalidOperationException e) {
- LOG.error("Error while updating list.", e);
+ LOG.error("Exception in updateList(). ", e);
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Fehler");
@@ -187,6 +186,7 @@ public class CreateOperationController {
FXCollections.observableArrayList(
operationService.list(EnumSet.of(Status.ACTIVE))));
} catch (ServiceException e) {
+ LOG.error("ServiceException in updateList(). ", e);
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Fehler - Einsätze");
alert.setHeaderText("Beim Holen der aktiven Einsätze ist ein Fehler aufgetreten.");
@@ -217,7 +217,7 @@ public class CreateOperationController {
vehicleService.update(data.toBuilder().status(status).build());
this.updateList();
} catch (InvalidVehicleException | ServiceException e) {
- LOG.error("Error while setting status.", e);
+ LOG.error("Exception in createContextMenu(). (mi.setOnAction) ", e);
Alert a = new Alert(AlertType.ERROR, e.getMessage());
a.show();
}
@@ -257,7 +257,7 @@ public class CreateOperationController {
this.updateList();
} catch (InvalidVehicleException | ServiceException e) {
- LOG.error("Error while unregistering.", e);
+ LOG.error("Exception in createContextMenu(). (abmelden.setOnAction) ", e);
Alert a = new Alert(AlertType.ERROR, e.getMessage());
a.show();
}
@@ -284,6 +284,7 @@ public class CreateOperationController {
try {
operationService.add(operation);
} catch (ServiceException | InvalidOperationException e) {
+ LOG.error("Exception in createOperationClicked(). ", e);
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Fehler");
alert.setHeaderText("Fehler!");
@@ -332,7 +333,7 @@ public class CreateOperationController {
.getResourceAsStream(
"/fxml/ArchiveOperation.fxml"))));
} catch (IOException e) {
- LOG.error("Could not open new window: {}", e);
+ LOG.error("IOException in openArchivWindow(). ", e);
}
stage.setTitle("Einsatz erstellen");
stage.centerOnScreen();
@@ -354,7 +355,7 @@ public class CreateOperationController {
.getResourceAsStream(
"/fxml/" + fxmlFileName))));
} catch (IOException e) {
- LOG.error("Could not open new window: {}", e);
+ LOG.error("IOException in openNewWindow(). ", e);
}
stage.setTitle("Ressourcenverwaltung");