Exception: LockError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/amp/support/support.rb

Direct Known Subclasses

LockHeld, LockUnavailable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errno, strerror, filename, desc) ⇒ LockError

Returns a new instance of LockError.



52
53
54
55
# File 'lib/amp/support/support.rb', line 52

def initialize(errno, strerror, filename, desc)
  super(strerror)
  @errno, @filename, @desc = errno, filename, desc
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



51
52
53
# File 'lib/amp/support/support.rb', line 51

def desc
  @desc
end

#errnoObject (readonly)

Returns the value of attribute errno.



51
52
53
# File 'lib/amp/support/support.rb', line 51

def errno
  @errno
end

#filenameObject (readonly)

Returns the value of attribute filename.



51
52
53
# File 'lib/amp/support/support.rb', line 51

def filename
  @filename
end

Instance Method Details

#to_sObject



56
57
58
# File 'lib/amp/support/support.rb', line 56

def to_s
  "LockError (#{@errno} @ #{@filename}) #{@strerror}: #{super}"
end