Saves the exception to database.
Namespace:
CuttingEdge.LoggingAssembly: CuttingEdge.Logging (in CuttingEdge.Logging.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Protected Overridable Function SaveExceptionToDatabase ( _ transaction As SqlTransaction, _ exception As Exception, _ parentEventId As Integer, _ parentExceptionId As Nullable(Of Integer) _ ) As Integer |
| C# |
|---|
protected virtual int SaveExceptionToDatabase( SqlTransaction transaction, Exception exception, int parentEventId, Nullable<int> parentExceptionId ) |
| Visual C++ |
|---|
protected: virtual int SaveExceptionToDatabase( SqlTransaction^ transaction, Exception^ exception, int parentEventId, Nullable<int> parentExceptionId ) |
| JavaScript |
|---|
function saveExceptionToDatabase(transaction, exception, parentEventId, parentExceptionId); |
Parameters
- transaction
- Type: System.Data.SqlClient..::.SqlTransaction
The transaction.
- exception
- Type: System..::.Exception
The exception.
- parentEventId
- Type: System..::.Int32
The parent event id.
- parentExceptionId
- Type: System..::.Nullable<(Of <(Int32>)>)
The parent exception id.
Return Value
The database's primary key of the saved exception.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown when either transaction or exception are null (Nothing in VB) references. |