From b16050cfc60c667b91817d63f0cf38827017c933 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 14 Sep 2023 15:40:45 +0200 Subject: [PATCH] Database: fix missing message on exception --- Database/Adapters/MSSQLServer.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/Adapters/MSSQLServer.vb b/Database/Adapters/MSSQLServer.vb index deb50b6f..44ef40f7 100644 --- a/Database/Adapters/MSSQLServer.vb +++ b/Database/Adapters/MSSQLServer.vb @@ -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}