Exception: Anakin::Error

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

Overview

Base type for all errors raised by the SDK. Rescue a specific subclass for fine-grained handling, or this base class for a generic fallback.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: 0, code: nil) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
# File 'lib/anakin/errors.rb', line 7

def initialize(message, status: 0, code: nil)
  super(message)
  @status = status
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/anakin/errors.rb', line 5

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/anakin/errors.rb', line 5

def status
  @status
end