Improve options check

This commit is contained in:
crschnick 2024-09-27 13:01:38 +00:00
parent d1f644998d
commit ca0df83c91
2 changed files with 10 additions and 4 deletions

View file

@ -11,9 +11,10 @@ public class AppJavaOptionsCheck {
}
ErrorEvent.fromMessage(
"You have configured the environment variable _JAVA_OPTIONS=%s on your system.".formatted(env)
+ " This will forcefully apply all custom JVM options to XPipe as well and can cause a variety of different issues."
"You have configured the global environment variable _JAVA_OPTIONS=%s on your system.".formatted(env)
+ " This will forcefully apply all custom JVM options to XPipe and can cause a variety of different issues."
+ " Please remove this global environment variable and use local configuration instead for your other JVM programs.")
.noDefaultActions()
.expected()
.handle();
}

View file

@ -254,14 +254,19 @@ public class ErrorHandlerComp extends SimpleComp {
actionBox.getChildren().add(ac);
}
if (!event.isDisableDefaultActions() || event.getCustomActions().isEmpty()) {
if (!event.isDisableDefaultActions()) {
for (var action :
List.of(ErrorAction.automaticallyReport(), ErrorAction.reportOnGithub(), ErrorAction.ignore())) {
var ac = createActionComp(action);
actionBox.getChildren().add(ac);
}
actionBox.getChildren().get(1).getStyleClass().addAll(BUTTON_OUTLINED, ACCENT);
} else if (event.getCustomActions().isEmpty()) {
for (var action : List.of(ErrorAction.ignore())) {
var ac = createActionComp(action);
actionBox.getChildren().add(ac);
}
}
actionBox.getChildren().get(1).getStyleClass().addAll(BUTTON_OUTLINED, ACCENT);
content.getChildren().addAll(actionBox);
content.getStyleClass().add("top");