throwExceptionIfNeeded method

void throwExceptionIfNeeded (String correlationId, List<ValidationResult> results, bool strict)

Throws ValidationException based on errors in validation results. If validation results have no errors, than no exception is thrown.

  • correlationId (optional) transaction id to trace execution through call chain.
  • results list of validation results that may contain errors
  • strict true to treat warnings as errors.

See ValidationResult See ValidationException