protected string FormatErrorMessage(ResourceManager resourceManager, CultureInfo cultureInfo, UserException ex) { if (ex is ValidationErrorsException) { return(FormatErrorMessage(resourceManager, cultureInfo, (ValidationErrorsException)ex)); } return(FormatErrorMessage(resourceManager, cultureInfo, ex.GetType(), null, ex.GetErrorMessageParameters())); }