Skip to content

Commit eb28480

Browse files
bitroncmaglie
authored andcommitted
Moved showWarning() implementation from Base to BaseNoGui.
1 parent 74f59c2 commit eb28480

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

app/src/processing/app/Base.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,16 +2265,7 @@ static public void showMessage(String title, String message) {
22652265
* Non-fatal error message with optional stack trace side dish.
22662266
*/
22672267
static public void showWarning(String title, String message, Exception e) {
2268-
if (title == null) title = _("Warning");
2269-
2270-
if (commandLine) {
2271-
System.out.println(title + ": " + message);
2272-
2273-
} else {
2274-
JOptionPane.showMessageDialog(new Frame(), message, title,
2275-
JOptionPane.WARNING_MESSAGE);
2276-
}
2277-
if (e != null) e.printStackTrace();
2268+
BaseNoGui.showWarning(title, message, e);
22782269
}
22792270

22802271

app/src/processing/app/BaseNoGui.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,4 +450,12 @@ static public void showError(String title, String message, Throwable e, int exit
450450
static public void showMessage(String title, String message) {
451451
notifier.showMessage(title, message);
452452
}
453+
454+
/**
455+
* Non-fatal error message with optional stack trace side dish.
456+
*/
457+
static public void showWarning(String title, String message, Exception e) {
458+
notifier.showWarning(title, message, e);
459+
}
460+
453461
}

0 commit comments

Comments
 (0)