Class BusinessException
Inheritance
Implements
Inherited Members
Namespace: Innovt.Core.Exceptions
Assembly: Innovt.Core.dll
Syntax
[Serializable]
public class BusinessException : BaseException, ISerializable
Constructors
| Edit this page View SourceBusinessException()
Initializes a new instance of the BusinessException class with no specified error message.
Declaration
public BusinessException()
BusinessException(ErrorMessage)
Initializes a new instance of the BusinessException class with a single validation error.
Declaration
public BusinessException(ErrorMessage error)
Parameters
| Type | Name | Description |
|---|---|---|
| ErrorMessage | error | A single validation error message. |
BusinessException(ErrorMessage[])
Initializes a new instance of the BusinessException class with an array of validation errors.
Declaration
public BusinessException(ErrorMessage[] errors)
Parameters
| Type | Name | Description |
|---|---|---|
| ErrorMessage[] | errors | An array of validation error messages. |
BusinessException(IList<ErrorMessage>)
Initializes a new instance of the BusinessException class with a list of validation errors.
Declaration
public BusinessException(IList<ErrorMessage> errors)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ErrorMessage> | errors | A list of validation error messages. |
BusinessException(SerializationInfo, StreamingContext)
Initializes a new instance of the BusinessException class with serialized data.
Declaration
protected BusinessException(SerializationInfo serializationInfo, StreamingContext streamingContext)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | serializationInfo | The SerializationInfo that holds the serialized object data about the exception being thrown. |
| StreamingContext | streamingContext | The StreamingContext that contains contextual information about the source or destination. |
BusinessException(string)
Initializes a new instance of the BusinessException class with a specified error message.
Declaration
public BusinessException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The error message that explains the reason for the exception. |
BusinessException(string, Exception)
Initializes a new instance of the BusinessException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public BusinessException(string message, Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The error message that explains the reason for the exception. |
| Exception | ex | The exception that is the cause of the current exception, or a null reference if no inner exception is specified. |
BusinessException(string, string)
Initializes a new instance of the BusinessException class with a code and a specified error message.
Declaration
public BusinessException(string code, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | code | A code associated with the exception. |
| string | message | The error message that explains the reason for the exception. |
BusinessException(string, string, Exception)
Initializes a new instance of the BusinessException class with a code, a specified error message, and a reference to the inner exception that is the cause of this exception.
Declaration
public BusinessException(string code, string message, Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | code | A code associated with the exception. |
| string | message | The error message that explains the reason for the exception. |
| Exception | ex | The exception that is the cause of the current exception, or a null reference if no inner exception is specified. |
Properties
| Edit this page View SourceCode
Gets or sets a code associated with the exception.
Declaration
public string Code { get; protected set; }
Property Value
| Type | Description |
|---|---|
| string |
Detail
Gets the detail information associated with the exception.
Declaration
public object Detail { get; }
Property Value
| Type | Description |
|---|---|
| object |
Errors
Gets or sets a list of validation error messages.
Declaration
public IEnumerable<ErrorMessage> Errors { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ErrorMessage> |
Methods
| Edit this page View SourceReadFullErrors()
Reads the full validation error messages.
Declaration
public string ReadFullErrors()
Returns
| Type | Description |
|---|---|
| string | A concatenated string of validation error messages. |