Exception: Acapela::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Acapela::Error
- Defined in:
- lib/acapela/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#original_error ⇒ Object
Returns the value of attribute original_error.
Instance Method Summary collapse
-
#initialize(message, original_error = nil) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(message, original_error = nil) ⇒ Error
Returns a new instance of Error.
6 7 8 9 |
# File 'lib/acapela/error.rb', line 6 def initialize(, original_error = nil) super() @original_error = original_error end |
Instance Attribute Details
#original_error ⇒ Object
Returns the value of attribute original_error.
4 5 6 |
# File 'lib/acapela/error.rb', line 4 def original_error @original_error end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/acapela/error.rb', line 11 def to_s if @original_error.nil? super else "#{super}\nCause: #{@original_error.to_s}" end end |