{
if (error instanceof RequestExecutionException)
{
RuntimeErrorType runtime = ErrorHelper.getRuntimeInstance(mErrors);
RequestExecutionException exc = (RequestExecutionException)error;
RequestStatus status = null;
try
{
status = exc.getRequestResource().getRequestStatus();
}
catch (Exception e)
{
// an error occurred whilst getting the request status
LOG.error("Error retrieving the request status", e);
return;
}
// add general errors
if (status.getError() != null)
{
ErrorType errorType = ErrorHelper.createError(status.getError());
runtime.getError().add(errorType);
}
Iterator<?> iterator = status.getActivities();
while (iterator.hasNext())
{
Entry<ActivityInstanceName, ActivityProcessingStatus> entry =
(Entry<ActivityInstanceName, ActivityProcessingStatus>) iterator.next();
if (entry.getValue().getStatus() == ActivityStatus.ERROR)