Search in sources :

Example 1 with KettleAuthException

use of org.pentaho.di.core.exception.KettleAuthException in project pentaho-kettle by pentaho.

the class Spoon method onLoginError.

private void onLoginError(Throwable t) {
    if (t instanceof KettleAuthException) {
        ShowMessageDialog dialog = new ShowMessageDialog(loginDialog.getShell(), SWT.OK | SWT.ICON_ERROR, BaseMessages.getString(PKG, "Spoon.Dialog.LoginFailed.Title"), t.getLocalizedMessage());
        dialog.open();
    } else {
        new ErrorDialog(loginDialog.getShell(), BaseMessages.getString(PKG, "Spoon.Dialog.LoginFailed.Title"), BaseMessages.getString(PKG, "Spoon.Dialog.LoginFailed.Message", t), t);
    }
}
Also used : ShowMessageDialog(org.pentaho.di.ui.core.dialog.ShowMessageDialog) ErrorDialog(org.pentaho.di.ui.core.dialog.ErrorDialog) KettleAuthException(org.pentaho.di.core.exception.KettleAuthException)

Aggregations

KettleAuthException (org.pentaho.di.core.exception.KettleAuthException)1 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)1 ShowMessageDialog (org.pentaho.di.ui.core.dialog.ShowMessageDialog)1