class

PgORM::Error::LockInvalidOp

Inherits PgORM::Error < Exception < Reference < Object

Raised when an invalid lock operation is attempted.

This occurs when:

  • Trying to lock an already locked lock
  • Trying to unlock a lock that isn't locked

Example

lock = PgORM::PgAdvisoryLock.new("my_lock")
lock.lock
lock.lock # Raises LockInvalidOp: "Lock (my_lock) already locked"

Constructors

new(key : String, locked : Bool)
Source