streamlines exception types
This commit is contained in:
@@ -263,7 +263,7 @@ where tbl.[name]=@0 and col.[name]=@1;", tableName, columnName)
|
||||
db.Execute(@"SET LOCK_TIMEOUT 1800;");
|
||||
var i = db.Execute(@"UPDATE umbracoLock WITH (REPEATABLEREAD) SET value = value*-1 WHERE id=@id", new { id = lockId });
|
||||
if (i == 0) // ensure we are actually locking!
|
||||
throw new InvalidOperationException($"LockObject with id={lockId} does not exist.");
|
||||
throw new ArgumentException($"LockObject with id={lockId} does not exist.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user