Database: fix missing message on exception

This commit is contained in:
Jonathan Jenne 2023-09-14 15:40:45 +02:00
parent a415f90906
commit b16050cfc6

View File

@ -111,7 +111,7 @@ Public Class MSSQLServer
Private Function MaybeGetTransaction(Connection As SqlConnection, Mode As TransactionMode, Transaction As SqlTransaction) As SqlTransaction
If Connection Is Nothing Then
Throw New ArgumentNullException("Connection")
Throw New ArgumentNullException("Connection", "Could not get transaction because connection is null!")
End If
If Mode = TransactionMode.NoTransaction Then
@ -269,7 +269,7 @@ Public Class MSSQLServer
Try
If pConnectionString Is Nothing OrElse pConnectionString.Length = 0 Then
Logger.Warn("Connection String is empty!")
Throw New ArgumentNullException("pConnectionString")
Throw New ArgumentNullException("pConnectionString", "Could not mask connection string because connectiong string is empty!")
End If
Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString}