This commit is contained in:
2020-01-09 14:47:13 +01:00
parent 2304214073
commit 0a7cdaa903
5 changed files with 50 additions and 40 deletions

View File

@@ -205,8 +205,8 @@ Public Class Firebird
oCommand.ExecuteNonQuery()
_Logger.Debug("Command executed!")
Catch ex As Exception
_Logger.Error(ex, $"Error in ExecuteNonQuery while executing command: '{SqlCommand}'")
_Logger.Warn($"Unexpected error in ExecuteNonQueryWithConnection: '{SqlCommand}'")
_Logger.Error(ex, $"Error in ExecuteNonQuery while executing command: [{SqlCommand}]")
_Logger.Warn($"Unexpected error in ExecuteNonQueryWithConnection: [{SqlCommand}]")
Throw ex
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
@@ -253,7 +253,7 @@ Public Class Firebird
}
oResult = oCommand.ExecuteScalar()
Catch ex As Exception
_Logger.Error(ex, $"Error in ReturnScalar while executing command: '{SqlQuery}'")
_Logger.Error(ex, $"Error in ReturnScalar while executing command: [{SqlQuery}]")
Throw ex
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
@@ -304,7 +304,7 @@ Public Class Firebird
oAdapter.Fill(oDatatable)
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn("Error in GetDatatableWithConnection while executing command: '{0}'", SqlQuery)
_Logger.Warn("Error in GetDatatableWithConnection while executing command: [{0}]", SqlQuery)
Throw ex
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)