mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
Moved showWarning() implementation from Base to BaseNoGui.
This commit is contained in:
parent
74f59c215a
commit
eb284804f5
@ -2265,16 +2265,7 @@ public class Base {
|
||||
* Non-fatal error message with optional stack trace side dish.
|
||||
*/
|
||||
static public void showWarning(String title, String message, Exception e) {
|
||||
if (title == null) title = _("Warning");
|
||||
|
||||
if (commandLine) {
|
||||
System.out.println(title + ": " + message);
|
||||
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(new Frame(), message, title,
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
}
|
||||
if (e != null) e.printStackTrace();
|
||||
BaseNoGui.showWarning(title, message, e);
|
||||
}
|
||||
|
||||
|
||||
|
@ -450,4 +450,12 @@ public class BaseNoGui {
|
||||
static public void showMessage(String title, String message) {
|
||||
notifier.showMessage(title, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Non-fatal error message with optional stack trace side dish.
|
||||
*/
|
||||
static public void showWarning(String title, String message, Exception e) {
|
||||
notifier.showWarning(title, message, e);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user