Exception: Kitsune::Kit::Errors::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:, hint: nil, context: {}, retryable: false) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
14
15
# File 'lib/kitsune/kit/errors.rb', line 9

def initialize(message, code:, hint: nil, context: {}, retryable: false)
  super(message)
  @code = code
  @hint = hint
  @context = context.freeze
  @retryable = retryable
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#contextObject (readonly)

Returns the value of attribute context.



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

def context
  @context
end

#hintObject (readonly)

Returns the value of attribute hint.



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

def hint
  @hint
end

#retryableObject (readonly)

Returns the value of attribute retryable.



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

def retryable
  @retryable
end