Fix error handler with empty details

This commit is contained in:
crschnick 2024-05-16 11:14:32 +00:00
parent b0491bbd66
commit b36ca8f557

View file

@ -259,9 +259,7 @@ public class ErrorHandlerComp extends SimpleComp {
actionBox.getChildren().get(1).getStyleClass().addAll(BUTTON_OUTLINED, ACCENT);
}
content.getChildren().addAll(actionBox, new Separator(Orientation.HORIZONTAL));
var details = createDetails();
content.getChildren().addAll(actionBox);
content.getStyleClass().add("top");
content.setFillWidth(true);
content.setPrefWidth(600);
@ -269,9 +267,14 @@ public class ErrorHandlerComp extends SimpleComp {
var layout = new BorderPane();
layout.setCenter(content);
layout.setBottom(details);
layout.getStyleClass().add("error-handler-comp");
if (event.getThrowable() != null) {
content.getChildren().add(new Separator(Orientation.HORIZONTAL));
var details = createDetails();
layout.setBottom(details);
}
return layout;
}
}