private void performAction( String actionName, BuildContext context )
throws TaskExecutionException
{
String error;
TaskExecutionException exception;
try
{
log.info( "Performing action " + actionName );
actionManager.lookup( actionName ).execute( context.getActionContext() );
return;
}
catch ( ActionNotFoundException e )
{
error = ContinuumBuildAgentUtil.throwableToString( e );
exception = new TaskExecutionException( "Error looking up action '" + actionName + "'", e );
}
catch ( ScmRepositoryException e )
{
error = getValidationMessages( e ) + "\n" + ContinuumBuildAgentUtil.throwableToString( e );
exception = new TaskExecutionException( "SCM error while executing '" + actionName + "'", e );
}
catch ( ScmException e )
{
error = ContinuumBuildAgentUtil.throwableToString( e );
exception = new TaskExecutionException( "SCM error while executing '" + actionName + "'", e );
}
catch ( Exception e )
{
exception = new TaskExecutionException( "Error executing action '" + actionName + "'", e );
error = ContinuumBuildAgentUtil.throwableToString( exception );
}
updateBuildResult( context, error );