Errors in schema validation. Validation errors are usually generated based in ValidationResult. If using strict mode, warnings will also raise validation exceptions.
More...
|
| | ValidationException (string correlationId, IList< ValidationResult > results) |
| | Creates a new instance of validation exception and assigns its values. More...
|
| |
| | ValidationException (string correlationId, string message) |
| | Creates a new instance of validation exception and assigns its values. More...
|
| |
| | BadRequestException (string message) |
| | Creates an error instance with error message. More...
|
| |
| | BadRequestException (Exception innerException) |
| | Creates an error instance with bad request error category and assigns its values. More...
|
| |
| | BadRequestException (string correlationId=null, string code=null, string message=null, Exception innerException=null) |
| | Creates an error instance and assigns its values. More...
|
| |
| | ApplicationException () |
| | Creates a new instance of application exception. More...
|
| |
| | ApplicationException (string category=null, string correlationId=null, string code=null, string message=null) |
| | Creates a new instance of application exception and assigns its values. More...
|
| |
|
override void | GetObjectData (SerializationInfo info, StreamingContext context) |
| |
| ApplicationException | WithCode (string code) |
| | Sets a unique error code. More...
|
| |
| ApplicationException | WithCorrelationId (string correlationId) |
| | Sets a correlation id which can be used to trace this error through a call chain. More...
|
| |
| ApplicationException | WithCause (Exception cause) |
| | Sets a original error wrapped by this exception. More...
|
| |
| ApplicationException | WithStatus (int status) |
| | Sets a HTTP status code which shall be returned by REST calls. More...
|
| |
| ApplicationException | WithDetails (string key, object value) |
| | Sets a parameter for additional error details. This details can be used to restore error description in other languages. More...
|
| |
| ApplicationException | WithStackTrace (string stackTrace) |
| | Sets a stack trace for this error. This method returns reference to this exception to implement Builder pattern to chain additional calls. More...
|
| |
| ApplicationException | Wrap (Exception cause) |
| | Wraps another exception into specified application exception object. If original exception is of ApplicationException type it is returned without changes.Otherwise the original error is set as a cause to specified ApplicationException object. More...
|
| |
|
|
| ValidationException (SerializationInfo info, StreamingContext context) |
| |
|
| BadRequestException (SerializationInfo info, StreamingContext context) |
| |
| | ApplicationException (string message) |
| | Creates a new instance of application exception with string message. More...
|
| |
|
| ApplicationException (SerializationInfo info, StreamingContext context) |
| |
Errors in schema validation. Validation errors are usually generated based in ValidationResult. If using strict mode, warnings will also raise validation exceptions.
See BadRequestException, ValidationResult
◆ ValidationException() [1/2]
| PipServices3.Commons.Validate.ValidationException.ValidationException |
( |
string |
correlationId, |
|
|
IList< ValidationResult > |
results |
|
) |
| |
Creates a new instance of validation exception and assigns its values.
- Parameters
-
| correlationId | (optional) a unique transaction id to trace execution through call chain. |
| results | (optional) a list of validation results |
See ValidationResult
◆ ValidationException() [2/2]
| PipServices3.Commons.Validate.ValidationException.ValidationException |
( |
string |
correlationId, |
|
|
string |
message |
|
) |
| |
Creates a new instance of validation exception and assigns its values.
- Parameters
-
| correlationId | (optional) a unique transaction id to trace execution through call chain. |
| message | (optional) a human-readable description of the error. |
See ValidationResult
◆ ComposeMessage()
| static string PipServices3.Commons.Validate.ValidationException.ComposeMessage |
( |
IList< ValidationResult > |
results | ) |
|
|
static |
Composes human readable error message based on validation results.
- Parameters
-
| results | a list of validation results. |
- Returns
- a composed error message.
See ValidationResult
◆ ThrowExceptionIfNeeded()
| static void PipServices3.Commons.Validate.ValidationException.ThrowExceptionIfNeeded |
( |
string |
correlationId, |
|
|
IList< ValidationResult > |
results, |
|
|
bool |
strict |
|
) |
| |
|
static |
Throws ValidationException based on errors in validation results. If validation results have no errors, than no exception is thrown.
- Parameters
-
| 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, ValidationException
The documentation for this class was generated from the following file:
- src/Validate/ValidationException.cs