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();
}
Aggregations