Exception: Msgr::CausedByError
- Inherits:
-
StandardError
- Object
- StandardError
- Msgr::CausedByError
- Defined in:
- lib/msgr/errors.rb
Overview
Abstract error base class
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cause ⇒ Object
Returns the value of attribute cause.
Instance Method Summary collapse
-
#initialize(*args) ⇒ CausedByError
constructor
A new instance of CausedByError.
- #message ⇒ Object
Constructor Details
#initialize(*args) ⇒ CausedByError
Returns a new instance of CausedByError.
7 8 9 10 11 |
# File 'lib/msgr/errors.rb', line 7 def initialize(*args) opts = args. @cause = opts.delete(:cause) super end |
Instance Attribute Details
#cause ⇒ Object
Returns the value of attribute cause.
5 6 7 |
# File 'lib/msgr/errors.rb', line 5 def cause @cause end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/msgr/errors.rb', line 13 def cause ? "#{super}\n caused by:\n#{cause.to_s}" : super end |