Exception: Rexpense::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rexpense/exception.rb

Direct Known Subclasses

RequestError, RequestTimeout

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Exception

Returns a new instance of Exception.



5
6
7
8
9
# File 'lib/rexpense/exception.rb', line 5

def initialize(args = {})
  super(args[:message])
  @code     = args[:code]
  @body     = args[:body]
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/rexpense/exception.rb', line 3

def body
  @body
end

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/rexpense/exception.rb', line 3

def code
  @code
end