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.
8 9 10 11 12 |
# File 'lib/msgr/errors.rb', line 8 def initialize(*args) opts = args. @cause = opts.delete(:cause) super end |
Instance Attribute Details
#cause ⇒ Object
Returns the value of attribute cause.
6 7 8 |
# File 'lib/msgr/errors.rb', line 6 def cause @cause end |
Instance Method Details
#message ⇒ Object
14 15 16 |
# File 'lib/msgr/errors.rb', line 14 def cause ? "#{super}\n caused by:\n#{cause}" : super end |