diff options
Diffstat (limited to 'src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung')
-rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/CreateOperationController.java | 25 |
1 files changed, 18 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 68a3548..fe1b1d8 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 @@ -19,7 +19,6 @@ import java.util.List; import java.util.Set; import javafx.collections.FXCollections; import javafx.fxml.FXML; -import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; import javafx.scene.control.ContextMenu; @@ -193,10 +192,16 @@ public class CreateOperationController { try { vehicleService.update(data.toBuilder().status(status).build()); this.updateList(); - } catch (InvalidVehicleException | ServiceException e) { + } catch (InvalidVehicleException e) { + LOG.debug( + "Validation error in createContextMenu(). (mi.setOnAction) ", + e); + Helper.showAlertWithOkButtonAndWait( + AlertType.ERROR, "Validierungsfehler", e.getMessage()); + } catch (ServiceException e) { LOG.error("Exception in createContextMenu(). (mi.setOnAction) ", e); - Alert a = new Alert(AlertType.ERROR, e.getMessage()); - a.show(); + Helper.showAlertWithOkButtonAndWait( + AlertType.ERROR, "Fehler", e.getMessage()); } }); @@ -233,10 +238,16 @@ public class CreateOperationController { .build()); this.updateList(); - } catch (InvalidVehicleException | ServiceException e) { + } catch (InvalidVehicleException e) { + LOG.debug( + "Validation error in createContextMenu(). (abmelden.setOnAction) ", + e); + Helper.showAlertWithOkButtonAndWait( + AlertType.ERROR, "Validierungsfehler", e.getMessage()); + } catch (ServiceException e) { LOG.error("Exception in createContextMenu(). (abmelden.setOnAction) ", e); - Alert a = new Alert(AlertType.ERROR, e.getMessage()); - a.show(); + Helper.showAlertWithOkButtonAndWait( + AlertType.ERROR, "Fehler", e.getMessage()); } }); |