private void performAction( String actionName, BuildContext context )
throws TaskExecutionException
{
String error = null;
TaskExecutionException exception = null;
try
{
log.info( "Performing action " + actionName );
actionManager.lookup( actionName ).execute( context.getActionContext() );
return;
}
catch ( ActionNotFoundException e )
{
error = ContinuumUtils.throwableToString( e );
exception = new TaskExecutionException( "Error looking up action '" + actionName + "'", e );
}
catch ( ScmRepositoryException e )
{
error = getValidationMessages( e ) + "\n" + ContinuumUtils.throwableToString( e );
exception = new TaskExecutionException( "SCM error while executing '" + actionName + "'", e );
}
catch ( ScmException e )
{
error = ContinuumUtils.throwableToString( e );
exception = new TaskExecutionException( "SCM error while executing '" + actionName + "'", e );
}
catch ( Exception e )
{
exception = new TaskExecutionException( "Error executing action '" + actionName + "'", e );
error = ContinuumUtils.throwableToString( exception );
}
// TODO: clean this up. We catch the original exception from the action, and then update the buildresult
// for it - we need to because of the specialized error message for SCM.