From dcc46fa32d58d66d9d9015ce0a81c0ee8abf073e Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 15 Oct 2019 11:14:28 +1100 Subject: [PATCH] no generic exception --- src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs index 92ee934e52..4e541c80d1 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs @@ -169,7 +169,7 @@ where table_name=@0 and column_name=@1", tableName, columnName).FirstOrDefault() { var i = db.Execute(@"UPDATE umbracoLock SET value = value*-1 WHERE id=@id", new { id = lockId }); if (i == 0) // ensure we are actually locking! - throw new Exception($"LockObject with id={lockId} does not exist."); + throw new InvalidOperationException($"LockObject with id={lockId} does not exist."); } } @@ -185,7 +185,7 @@ where table_name=@0 and column_name=@1", tableName, columnName).FirstOrDefault() { var i = db.ExecuteScalar("SELECT value FROM umbracoLock 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 InvalidOperationException($"LockObject with id={lockId} does not exist."); } }