IDevice device = getDevice();
Assert.notNull( device );
- try
- {
- SyncService service = getSyncService();
- SyncResult syncSuccess =
- service.pushFile( localPath, remotePath, getProgressMonitor() );
- String name = FilenameUtil.getFilename( localPath );
- if ( syncSuccess.getCode() != SyncService.RESULT_OK ) {
- setResult( "Failed" );
- context.getPrompter().notify( "'" + name + "' file transfer failed." );
- return ;
- }
- setResult( "Success" );
- context.getPrompter().notify( "'" + name + "' file transfer successful." );
- } catch (Exception e) {
- throw new IllegalStateException( e );
+ SyncService service = getSyncService();
+ SyncResult syncSuccess =
+ service.pushFile( localPath, remotePath, getProgressMonitor() );
+ String name = FilenameUtil.getFilename( localPath );
+ if ( syncSuccess.getCode() != SyncService.RESULT_OK ) {
+ setResult( "Failed" );
+ context.getPrompter().notify( "'" + name + "' file transfer failed." );
+ return ;
}
+ setResult( "Success" );
+ context.getPrompter().notify( "'" + name + "' file transfer successful." );
}
@Override