forked from j62/ctbrec
Replace Exception parameter with Throwable
This commit is contained in:
parent
a7ab34c9d7
commit
7b7c7b24b1
|
@ -5,14 +5,14 @@ import javafx.application.Platform;
|
||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.Alert;
|
||||||
|
|
||||||
public class Dialogs {
|
public class Dialogs {
|
||||||
public static void showError(String header, String text, Exception e) {
|
public static void showError(String header, String text, Throwable t) {
|
||||||
Runnable r = () -> {
|
Runnable r = () -> {
|
||||||
Alert alert = new AutosizeAlert(Alert.AlertType.ERROR);
|
Alert alert = new AutosizeAlert(Alert.AlertType.ERROR);
|
||||||
alert.setTitle("Error");
|
alert.setTitle("Error");
|
||||||
alert.setHeaderText(header);
|
alert.setHeaderText(header);
|
||||||
String content = text;
|
String content = text;
|
||||||
if(e != null) {
|
if(t != null) {
|
||||||
content += " " + e.getLocalizedMessage();
|
content += " " + t.getLocalizedMessage();
|
||||||
}
|
}
|
||||||
alert.setContentText(content);
|
alert.setContentText(content);
|
||||||
alert.showAndWait();
|
alert.showAndWait();
|
||||||
|
|
Loading…
Reference in New Issue