AcquireDistributedLock should throw a specific exception

We have some code in a job filter that tries to acquire a distributed lock. When it fails, it needs to cancel the PerformingContext. The code looks as follows:

            return filterContext.Connection.AcquireDistributedLock(resource, timeout);
        catch (Exception)
            filterContext.Canceled = true;
            return true;

What I (and FxCop) don’t like is the catch-all-exceptions. I would like to have a more specific exception to catch. In our environment, a SqlServerDistributedLockException is thrown but

  1. This class is internal.
  2. Under a different configuration it might be a different exception (non SQL Server specific), I assume.

Would it make sense to expect a specific exception type from AcquireDistributedLock? Either a (public) Hangfire-custom one, or InvalidOperationException? Or alternatively, to have a TryAcquireDistributedLock with a boolean return value.

I would suggest that TryAcquireDistributedLock returning a boolean result would be more suitable for general use as failing to acquire a distributed lock is not really an exceptional case and should be somewhat expected.

If AcquireDistributedLock is retained then I agree that it should throw a storage-agnostic exception.