@Override public void writeJob( String str ) throws KettleException { try { out.write( str ); } catch ( IOException e ) { throw new KettleException( e ); } }
@Override public String getMessage() { String msgText = BaseMessages.getString( PKG, "KettleCellValueException.CannotConvertFieldFromCell", Integer .toString( sheetnr ), Integer.toString( rownr ), Integer.toString( colnr ), fieldName, super .getMessage() ); return msgText; }
public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException { try { rep.save( meta, versionComment, new ProgressMonitorAdapter( monitor ) ); } catch ( KettleException e ) { throw new InvocationTargetException( e, BaseMessages.getString( PKG, "TransSaveProgressDialog.Exception.ErrorSavingTransformation" ) + e.toString() ); } } };
public void widgetSelected( SelectionEvent arg0 ) { try { selectWSDLOperation( wOperation.getText() ); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } }
@Override public void handleEvent( Event event ) { try { event.doit = Spoon.getInstance().quitFile( false ); } catch ( KettleException e ) { e.printStackTrace(); } }
void closeFile() throws KettleException { try { if ( fc != null ) { fc.close(); } if ( fis != null ) { fis.close(); } } catch ( IOException e ) { throw new KettleException( "Unable to close file channel for file '" + filenames[filenr - 1], e ); } }
@Override public int compare( QueueEntry a, QueueEntry b ) { try { int cmp = data.metas[a.index].compare( a.row, data.metas[b.index], b.row, data.keyNrs[a.index], data.keyNrs[b.index] ); return cmp > 0 ? 1 : cmp < 0 ? -1 : 0; } catch ( KettleException e ) { throw new RuntimeException( e.getMessage() ); } } }
@Override public boolean isVersioningEnabled( String fullPath ) { FileVersioningConfiguration versioningConfiguration; try { versioningConfiguration = callVersioningService( fullPath ); } catch ( KettleException e ) { e.printStackTrace(); return false; } return versioningConfiguration.isVersioningEnabled(); }
public void closeFile() throws KettleException { try { if ( data.s3ObjectInputStream != null ) { data.s3ObjectInputStream.close(); } } catch ( IOException e ) { throw new KettleException( "Unable to close file channel for file '" + data.filenames[data.filenr - 1], e ); } } }
@Override public String getMessage() { StringBuilder message = new StringBuilder( super.getMessage() ); message.append( getPluginsMessage() ); return message.toString(); }
public static IRole convertFromNonPentahoRole( String role, IRoleSupportSecurityManager rsm ) { IRole roleInfo = null; try { roleInfo = rsm.constructRole(); roleInfo.setName( role ); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } return roleInfo; }
private synchronized void closePipe() throws KettleException { try { if ( data != null ) { data.dispose(); // gtf: OutputStream gets closed here } } catch ( Exception e ) { throw new KettleException( e ); // FIX FOR IB TICKET #390822 } finally { triedToClosePipe = true; } }
public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException { // This is running in a new process: copy some KettleVariables info // LocalVariables.getInstance().createKettleVariables(Thread.currentThread(), parentThread, true); // --> don't set variables if not running in different thread --> pmd.run(true,true, op); try { stats = transMeta.getSQLStatements( new ProgressMonitorAdapter( monitor ) ); } catch ( KettleException e ) { throw new InvocationTargetException( e, BaseMessages.getString( PKG, "GetSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception", e.getMessage() ) ); } } };
private IUser createUserInfo( String user ) { IUser userInfo = null; try { userInfo = this.rsm.constructUser(); userInfo.setName( user ); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } return userInfo; }
@Override public ObjectId getPartitionSchemaID( String name ) throws KettleException { try { return getObjectId( name, null, RepositoryObjectType.PARTITION_SCHEMA, false ); } catch ( Exception e ) { throw new KettleException( "Unable to get ID for partition schema [" + name + "]", e ); } }
@Test public void testErrorReadingFile() throws Exception { when( repoMeta.getKettleUserRepositoriesFile() ).thenReturn( getClass().getResource( "bad-repositories.xml" ).getPath() ); try { repoMeta.readData(); } catch ( KettleException e ) { assertEquals( Const.CR + "Error reading information from file:" + Const.CR + "The element type \"repositories\" must be terminated by the matching end-tag \"</repositories>\"." + Const.CR, e.getMessage() ); } }
private IRole createRoleInfo( String role ) { IRole roleInfo = null; try { roleInfo = rsm.constructRole(); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } roleInfo.setName( role ); return roleInfo; } }
@Override public ObjectId getSlaveID( String name ) throws KettleException { try { return getObjectId( name, null, RepositoryObjectType.SLAVE_SERVER, false ); } catch ( Exception e ) { throw new KettleException( "Unable to get ID for slave server with name [" + name + "]", e ); } }
@Test public void testErrorReadingInputStream() throws Exception { try { repoMeta.readDataFromInputStream( getClass().getResourceAsStream( "filedoesnotexist.xml" ) ); } catch ( KettleException e ) { assertEquals( Const.CR + "Error reading information from file:" + Const.CR + "InputStream cannot be null" + Const.CR, e.getMessage() ); } }
public boolean allowsVersionComments( String fullPath ) { FileVersioningConfiguration versioningConfiguration; try { versioningConfiguration = callVersioningService( fullPath ); } catch ( KettleException e ) { e.printStackTrace(); return false; } return versioningConfiguration.isVersionCommentEnabled(); }