Search in sources :

Example 1 with ExceptionDialog

use of com.haulmont.cuba.web.exception.ExceptionDialog in project cuba by cuba-platform.

the class WebWindowManager method showExceptionDialog.

@Override
public void showExceptionDialog(Throwable throwable, @Nullable String caption, @Nullable String message) {
    Preconditions.checkNotNullArgument(throwable);
    Throwable rootCause = ExceptionUtils.getRootCause(throwable);
    if (rootCause == null) {
        rootCause = throwable;
    }
    ExceptionDialog dialog = new ExceptionDialog(rootCause, caption, message);
    for (com.vaadin.ui.Window window : ui.getWindows()) {
        if (window.isModal()) {
            dialog.setModal(true);
            break;
        }
    }
    ui.addWindow(dialog);
    dialog.focus();
}
Also used : com.haulmont.cuba.web.toolkit.ui(com.haulmont.cuba.web.toolkit.ui) com.vaadin.ui(com.vaadin.ui) ExceptionDialog(com.haulmont.cuba.web.exception.ExceptionDialog)

Aggregations

ExceptionDialog (com.haulmont.cuba.web.exception.ExceptionDialog)1 com.haulmont.cuba.web.toolkit.ui (com.haulmont.cuba.web.toolkit.ui)1 com.vaadin.ui (com.vaadin.ui)1