/** * get the messages back to it's origin cause. */ @Override public String getMessage() { String retval = Const.CR; retval += super.getMessage() + Const.CR; Throwable cause = getCause(); if ( cause != null ) { String message = cause.getMessage(); if ( message != null ) { retval += message + Const.CR; } else { // Add with stack trace elements of cause... StackTraceElement[] ste = cause.getStackTrace(); for ( int i = ste.length - 1; i >= 0; i-- ) { retval += " at " + ste[i].getClassName() + "." + ste[i].getMethodName() + " (" + ste[i].getFileName() + ":" + ste[i].getLineNumber() + ")" + Const.CR; } } } return retval; }
Throwable cause = ke.getCause(); if ( cause != null && cause.getMessage() != null ) { text.append( cause.getMessage() );
@Override public void pluginAdded( Object serviceObject ) { PluginInterface plugin = (PluginInterface) serviceObject; String pluginName = plugin.getName(); try { DatabaseInterface databaseInterface = (DatabaseInterface) registry.loadClass( plugin ); databaseInterface.setPluginId( plugin.getIds()[0] ); databaseInterface.setName( pluginName ); databaseTypeAdded( pluginName, databaseInterface ); } catch ( KettleException e ) { Throwable t = e; if ( e.getCause() != null ) { t = e.getCause(); } System.out.println( "Could not create connection entry for " + pluginName + ". " + t.getClass().getName() ); LogChannel.GENERAL.logError( "Could not create connection entry for " + pluginName + ". " + t.getClass().getName() ); } }
repoObject.setName( newName ); } catch ( KettleException ke ) { if ( ke.getCause() instanceof RepositoryObjectAccessException ) { moveDeletePrompt( ke, repoObject, new XulDialogCallback<Object>() {
protected boolean moveDeletePrompt( final KettleException ke, final UIRepositoryObject repoObject, final XulDialogCallback<Object> action ) { if ( ke.getCause() instanceof RepositoryObjectAccessException && ( (RepositoryObjectAccessException) ke.getCause() ).getObjectAccessType().equals( RepositoryObjectAccessException.AccessExceptionType.USER_HOME_DIR ) && repoObject instanceof UIEERepositoryDirectory ) {
repoDir.refresh(); if ( ke.getCause() instanceof RepositoryObjectAccessException ) { moveDeletePrompt( ke, repoObject, new XulDialogCallback<Object>() {