SqlErrorException
Exception that wraps a SqlError for proper error propagation
public sealed class SqlErrorException : Exception, ISerializable
Constructors
SqlErrorException
public SqlErrorException(SqlError sqlError)
Initializes a new instance of the class with the specified <code class="paramref">sqlError</code>. The base exception message is set from.
| Parameter | Type | Description |
|---|---|---|
sqlError |
SqlError |
The SQL error to wrap. |
SqlErrorException
public SqlErrorException(SqlError sqlError, Exception innerException)
Initializes a new instance of the `` class with the specified sqlError
and an inner exception that is the cause of this exception.
| Parameter | Type | Description |
|---|---|---|
sqlError |
SqlError |
The SQL error to wrap. |
innerException |
Exception |
The exception that caused the current exception. |
SqlErrorException
public SqlErrorException()
Initializes a new instance of the `` class.
SqlErrorException
public SqlErrorException(string message)
Initializes a new instance of the `` class with a specified error message.
| Parameter | Type | Description |
|---|---|---|
message |
String |
The message that describes the error. |
SqlErrorException
public SqlErrorException(string message, Exception innerException)
Initializes a new instance of the `` class with a specified error message and a reference to the inner exception that is the cause of this exception.
| Parameter | Type | Description |
|---|---|---|
message |
String |
The message that describes the error. |
innerException |
Exception |
The exception that is the cause of the current exception. |
Properties
SqlError
public SqlError? SqlError { get; }
Gets the associated `` if available.