Exception: Circuitbox::ServiceFailureError
- Defined in:
- lib/circuitbox/errors/service_failure_error.rb
Instance Attribute Summary collapse
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(service, exception) ⇒ ServiceFailureError
constructor
A new instance of ServiceFailureError.
- #to_s ⇒ Object
Constructor Details
#initialize(service, exception) ⇒ ServiceFailureError
Returns a new instance of ServiceFailureError.
7 8 9 10 11 12 13 14 |
# File 'lib/circuitbox/errors/service_failure_error.rb', line 7 def initialize(service, exception) super() @service = service @original = exception # We copy over the original exceptions backtrace if there is one backtrace = exception.backtrace set_backtrace(backtrace) unless backtrace.empty? end |
Instance Attribute Details
#original ⇒ Object (readonly)
Returns the value of attribute original.
5 6 7 |
# File 'lib/circuitbox/errors/service_failure_error.rb', line 5 def original @original end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
5 6 7 |
# File 'lib/circuitbox/errors/service_failure_error.rb', line 5 def service @service end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/circuitbox/errors/service_failure_error.rb', line 16 def to_s "#{self.class}: Service #{service.inspect} was unavailable (original: #{original})" end |