@Override
    public void handleError(String errMsg, Throwable t){
        // Print error to log.
        logger.log(Level.SEVERE, errMsg, t);
        // Display error message on screen if not in headless mode
        if (context.getType() != JmeContext.Type.Headless) {
            if (t != null) {
                JmeSystem.handleErrorMessage(errMsg + "\n" + t.getClass().getSimpleName() +
                        (t.getMessage() != null ? ": " +  t.getMessage() : ""));
            } else {
                JmeSystem.handleErrorMessage(errMsg);
            }
        }

        stop(); // stop the application
    }
Handle the error given in parameters by creating a log entry and a dialog window. Internal use only.
jme3-vr/src/main/java/com/jme3/app/VRApplication.java