Exception: Blabbermouth::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Blabbermouth::Error
- Defined in:
- lib/blabbermouth/exceptions.rb
Instance Method Summary collapse
-
#initialize(key, e = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(key, e = nil) ⇒ Error
Returns a new instance of Error.
3 4 5 6 7 8 9 10 11 |
# File 'lib/blabbermouth/exceptions.rb', line 3 def initialize(key, e=nil) if e.is_a?(Exception) super("#{key}: #{e.class.name}: #{e.}") set_backtrace e.backtrace else super("#{key}: #{e.to_s}") set_backtrace caller end end |