CloudTracing.exit(invocationId, result);
}
if (result.getStatus() != OperationStatus.Succeeded) {
if (result.getError() != null) {
ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage());
ex.setErrorCode(result.getError().getCode());
ex.setErrorMessage(result.getError().getMessage());
if (shouldTrace) {
CloudTracing.error(invocationId, ex);
}
throw ex;
} else {
ServiceException ex = new ServiceException("");
if (shouldTrace) {
CloudTracing.error(invocationId, ex);
}
throw ex;
}