Class AbpValidationException
This exception type is used to throws validation exceptions.
Namespace: Volo.Abp.Validation
Assembly: Volo.Abp.Validation.Abstractions.dll
Syntax
public class AbpValidationException : AbpException, IHasLogLevel, IHasValidationErrors, IExceptionWithSelfLogging
Constructors
AbpValidationException()
Constructor.
Declaration
public AbpValidationException()
AbpValidationException(IList<ValidationResult>)
Constructor.
Declaration
public AbpValidationException(IList<ValidationResult> validationErrors)
Parameters
Type | Name | Description |
---|---|---|
IList<ValidationResult> | validationErrors | Validation errors |
AbpValidationException(SerializationInfo, StreamingContext)
Constructor for serializing.
Declaration
public AbpValidationException(SerializationInfo serializationInfo, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | serializationInfo | |
StreamingContext | context |
AbpValidationException(String)
Constructor.
Declaration
public AbpValidationException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Exception message |
AbpValidationException(String, Exception)
Constructor.
Declaration
public AbpValidationException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Exception message |
Exception | innerException | Inner exception |
AbpValidationException(String, IList<ValidationResult>)
Constructor.
Declaration
public AbpValidationException(string message, IList<ValidationResult> validationErrors)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Exception message |
IList<ValidationResult> | validationErrors | Validation errors |
Properties
LogLevel
Exception severity. Default: Warn.
Declaration
public LogLevel LogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel |
ValidationErrors
Detailed list of validation errors for this exception.
Declaration
public IList<ValidationResult> ValidationErrors { get; }
Property Value
Type | Description |
---|---|
IList<ValidationResult> |
Methods
Log(ILogger)
Declaration
public void Log(ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger |