Exception: Hoth::HothException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hoth/exceptions.rb

Direct Known Subclasses

TransportError, TransportException

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



3
4
5
# File 'lib/hoth/exceptions.rb', line 3

def original
  @original
end

Class Method Details

.wrap(original) ⇒ Object



4
5
6
7
8
9
# File 'lib/hoth/exceptions.rb', line 4

def self.wrap(original)
  wrapped = new("#{original.class} says: #{original.message}")
  wrapped.set_backtrace original.backtrace
  wrapped.instance_variable_set :@original, original
  wrapped
end