diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs index f242bddcca..1aa0696bd6 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs @@ -246,7 +246,7 @@ where tbl.[name]=@0 and col.[name]=@1;", tableName, columnName) // soon as we get Database, a transaction is started if (db.Transaction.IsolationLevel < IsolationLevel.ReadCommitted) - throw new InvalidOperationException("A transaction with minimum RepeatableRead isolation level is required."); + throw new InvalidOperationException("A transaction with minimum ReadCommitted isolation level is required."); // *not* using a unique 'WHERE IN' query here because the *order* of lockIds is important to avoid deadlocks @@ -269,14 +269,14 @@ where tbl.[name]=@0 and col.[name]=@1;", tableName, columnName) // soon as we get Database, a transaction is started if (db.Transaction.IsolationLevel < IsolationLevel.ReadCommitted) - throw new InvalidOperationException("A transaction with minimum RepeatableRead isolation level is required."); + throw new InvalidOperationException("A transaction with minimum ReadCommitted isolation level is required."); // *not* using a unique 'WHERE IN' query here because the *order* of lockIds is important to avoid deadlocks foreach (var lockId in lockIds) { var i = db.ExecuteScalar("SELECT value FROM umbracoLock WITH (REPEATABLEREAD) WHERE id=@id", new { id = lockId }); if (i == null) // ensure we are actually locking! - throw new Exception($"LockObject with id={lockId} does not exist."); + throw new ArgumentException($"LockObject with id={lockId} does not exist.", nameof(lockIds)); } } public override bool DoesTableExist(IDatabase db, string tableName)