Exception: Bitly4R::Error
- Inherits:
-
Exception
- Object
- Exception
- Bitly4R::Error
- Defined in:
- lib/bitly4r/objects.rb
Overview
Error
A Module-specific Exception class
– i would have called it Bitly4R::Exception except that i don’t know how to access Kernel::Exception within the initialize logic ++
Instance Attribute Summary collapse
-
#cause ⇒ Object
The propagated cause of this Exception, if appropriate.
Instance Method Summary collapse
-
#initialize(message, cause = nil) ⇒ Error
constructor
Provide a message and an optional ‘causing’ Exception.
Constructor Details
#initialize(message, cause = nil) ⇒ Error
Provide a message and an optional ‘causing’ Exception.
If no message is passed – eg. only an Exception – then this Exception inherits its message.
25 26 27 28 29 30 31 32 33 |
# File 'lib/bitly4r/objects.rb', line 25 def initialize(, cause=nil) if (Exception === ) super .to_s @cause = else super @cause = cause end end |
Instance Attribute Details
#cause ⇒ Object
The propagated cause of this Exception, if appropriate
20 21 22 |
# File 'lib/bitly4r/objects.rb', line 20 def cause @cause end |