Class: RDStation::ErrorHandler::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/rdstation/error_handler/default.rb

Constant Summary collapse

EXCEPTION_CLASS =
RDStation::Error::Default

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_response) ⇒ Default

Returns a new instance of Default.



7
8
9
# File 'lib/rdstation/error_handler/default.rb', line 7

def initialize(api_response)
  @api_response = api_response
end

Instance Attribute Details

#api_response ⇒ Object (readonly)

Returns the value of attribute api_response.



4
5
6
# File 'lib/rdstation/error_handler/default.rb', line 4

def api_response
  @api_response
end

Instance Method Details

#raise_error ⇒ Object



11
12
13
14
15
16
# File 'lib/rdstation/error_handler/default.rb', line 11

def raise_error
  raise RDStation::Error::Default.new(
    'An unrecognized error has occurred.',
    api_response
  )
end