Exception: WithAdvisoryLock::NestedAdvisoryLockError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/with_advisory_lock/nested_advisory_lock_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, lock_stack = nil) ⇒ NestedAdvisoryLockError


5
6
7
8
# File 'lib/with_advisory_lock/nested_advisory_lock_error.rb', line 5

def initialize(msg = nil, lock_stack = nil)
  super(msg)
  @lock_stack = lock_stack
end

Instance Attribute Details

#lock_stackObject

Returns the value of attribute lock_stack


3
4
5
# File 'lib/with_advisory_lock/nested_advisory_lock_error.rb', line 3

def lock_stack
  @lock_stack
end

Instance Method Details

#to_sObject


10
11
12
# File 'lib/with_advisory_lock/nested_advisory_lock_error.rb', line 10

def to_s
  super + (lock_stack ? ": lock stack = #{lock_stack}" : "")
end