Exception: FoucaultHttp::MonadException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/foucault_http/monad_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result:, code: nil, retryable: true) ⇒ MonadException

Returns a new instance of MonadException.



7
8
9
10
11
12
# File 'lib/foucault_http/monad_exception.rb', line 7

def initialize(result: , code: nil, retryable: true)
  self.error_code = code
  @retryable = retryable
  @result = result
  super(nil)
end

Instance Attribute Details

#error_codeObject

Returns the value of attribute error_code.



5
6
7
# File 'lib/foucault_http/monad_exception.rb', line 5

def error_code
  @error_code
end

#resultObject (readonly)

Returns the value of attribute result.



5
6
7
# File 'lib/foucault_http/monad_exception.rb', line 5

def result
  @result
end

#retryableObject (readonly)

Returns the value of attribute retryable.



5
6
7
# File 'lib/foucault_http/monad_exception.rb', line 5

def retryable
  @retryable
end