Exception: Stic::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/stic/errors.rb

Direct Known Subclasses

BlobError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
# File 'lib/stic/errors.rb', line 5

def initialize(opts = {})
  @cause = opts.fetch :cause, $!

  super opts.fetch(:message) { self.message }
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



3
4
5
# File 'lib/stic/errors.rb', line 3

def cause
  @cause
end