Example usage for com.vaadin.server DeploymentConfiguration isProductionMode

List of usage examples for com.vaadin.server DeploymentConfiguration isProductionMode

Introduction

In this page you can find the example usage for com.vaadin.server DeploymentConfiguration isProductionMode.

Prototype

public boolean isProductionMode();

Source Link

Document

Returns whether Vaadin is in production mode.

Usage

From source file:pl.exsio.frameset.vaadin.ui.FramesetUI.java

License:Open Source License

protected void setProductionErrorHandlerIfAppropriate() {
    DeploymentConfiguration conf = getSession().getConfiguration();
    if (conf.isProductionMode()) {
        this.setErrorHandler(new ErrorHandler() {

            @Override//from  w  ww. j  a  v  a  2s . co  m
            public void error(com.vaadin.server.ErrorEvent event) {
                Notification.show(event.getThrowable().getMessage(), Notification.Type.TRAY_NOTIFICATION);
            }
        });
    }
}