Exception: Moceansdk::Exceptions::MoceanError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/moceansdk/exceptions/mocean_error.rb

Direct Known Subclasses

RequiredFieldException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, error_response = nil) ⇒ MoceanError

Returns a new instance of MoceanError.



7
8
9
10
11
12
13
14
# File 'lib/moceansdk/exceptions/mocean_error.rb', line 7

def initialize(msg, error_response = nil)
  if error_response.nil?
    super(msg)
  else
    super(error_response['err_msg'])
    @error_response = error_response
  end
end

Instance Attribute Details

#error_responseObject (readonly)

Returns the value of attribute error_response.



5
6
7
# File 'lib/moceansdk/exceptions/mocean_error.rb', line 5

def error_response
  @error_response
end