mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Improve options check
This commit is contained in:
parent
d1f644998d
commit
ca0df83c91
2 changed files with 10 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue