Exception: Tenax::ExecutionError

Inherits:
Error
  • Object
show all
Defined in:
lib/tenax/errors.rb

Overview

Raised at runtime by Tenax::Runner when an operation cannot complete under its profile's resilience policy.

Carries a context hash with diagnostic data. Subclasses add specific attributes for their failure mode.

Direct Known Subclasses

CircuitOpenError, RetryLimitExceeded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, profile_name:, attempts:) ⇒ ExecutionError

Returns a new instance of ExecutionError.



59
60
61
62
63
# File 'lib/tenax/errors.rb', line 59

def initialize(message, profile_name:, attempts:)
  @profile_name = profile_name
  @attempts = attempts
  super(message)
end

Instance Attribute Details

#attempts ⇒ Object (readonly)

Returns the value of attribute attempts.



57
58
59
# File 'lib/tenax/errors.rb', line 57

def attempts
  @attempts
end

#profile_name ⇒ Object (readonly)

Returns the value of attribute profile_name.



57
58
59
# File 'lib/tenax/errors.rb', line 57

def profile_name
  @profile_name
end