Exception: Artery::Error

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

Direct Known Subclasses

FormatError, RequestError, TimeoutError, Worker::Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, **context) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
12
13
14
# File 'lib/artery/errors.rb', line 7

def initialize(message = nil, **context)
  super(message)

  @original_exception = context.delete(:original_exception)
  @artery_context = context

  set_backtrace @original_exception ? @original_exception.backtrace : caller if backtrace.blank?
end

Instance Attribute Details

#artery_contextObject

Returns the value of attribute artery_context.



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

def artery_context
  @artery_context
end