|
|
@ -518,12 +518,14 @@ public class Application implements SystemListener { |
|
|
|
public void handleError(String errMsg, Throwable t){ |
|
|
|
public void handleError(String errMsg, Throwable t){ |
|
|
|
// Print error to log.
|
|
|
|
// Print error to log.
|
|
|
|
logger.log(Level.SEVERE, errMsg, t); |
|
|
|
logger.log(Level.SEVERE, errMsg, t); |
|
|
|
// Display error message on screen
|
|
|
|
// Display error message on screen if not in headless mode
|
|
|
|
if (t != null) { |
|
|
|
if (context.getType() != JmeContext.Type.Headless) { |
|
|
|
JmeSystem.showErrorDialog(errMsg + "\n" + t.getClass().getSimpleName() + |
|
|
|
if (t != null) { |
|
|
|
(t.getMessage() != null ? ": " + t.getMessage() : "")); |
|
|
|
JmeSystem.showErrorDialog(errMsg + "\n" + t.getClass().getSimpleName() + |
|
|
|
} else { |
|
|
|
(t.getMessage() != null ? ": " + t.getMessage() : "")); |
|
|
|
JmeSystem.showErrorDialog(errMsg); |
|
|
|
} else { |
|
|
|
|
|
|
|
JmeSystem.showErrorDialog(errMsg); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stop(); // stop the application
|
|
|
|
stop(); // stop the application
|
|
|
|