Exception: Fluffy::APIError

Inherits:
Exception
  • Object
show all
Defined in:
lib/fluffy/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, error, code) ⇒ APIError

Returns a new instance of APIError.



8
9
10
11
12
13
# File 'lib/fluffy/exceptions.rb', line 8

def initialize(msg, error, code)
  @code = code
  @error = error

  super(msg)
end

Instance Attribute Details

#codeInteger (readonly)

Returns HTTP error code.

Returns:

  • (Integer)

    HTTP error code



4
5
6
# File 'lib/fluffy/exceptions.rb', line 4

def code
  @code
end

#errorString (readonly)

Returns Reason for error message.

Returns:

  • (String)

    Reason for error message



6
7
8
# File 'lib/fluffy/exceptions.rb', line 6

def error
  @error
end