Exception: GasfreeSdk::Error

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

Overview

Base error class for all SDK errors

Direct Known Subclasses

APIError, AuthenticationError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code: nil, reason: nil) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
# File 'lib/gasfree_sdk/errors.rb', line 9

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/gasfree_sdk/errors.rb', line 7

def code
  @code
end

#reasonObject (readonly)

Returns the value of attribute reason.



7
8
9
# File 'lib/gasfree_sdk/errors.rb', line 7

def reason
  @reason
end