public Exception HandleException(Exception exception, Guid handlingInstanceId) { var e = exception as BusinessValidationException; if (e != null) { var list = from error in e.Errors ?? new ValidationFailureInfo[0] select new ValidationFailure( error.PropertyName, error.ErrorMessage, error.ErrorCode, error.AttemptedValue); exception = new ServiceStack.FluentValidation.ValidationException(list); } return(exception); }
public Exception HandleException(Exception exception, Guid handlingInstanceId) { var e = exception as BusinessValidationException; if (e != null) { var list = from error in e.Errors ?? new ValidationFailureInfo[0] select new ValidationFailure( error.PropertyName, error.ErrorMessage, error.ErrorCode, error.AttemptedValue); exception = new ServiceStack.FluentValidation.ValidationException(list); } return exception; }