Exception: AptControl::Jabber::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/apt_control/jabber.rb

Overview

Thank you to rubyforge.org/projects/nestegg for the pattern

Direct Known Subclasses

ConnectionError, SendError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, cause = nil) ⇒ Error

Returns a new instance of Error.



99
100
101
102
# File 'lib/apt_control/jabber.rb', line 99

def initialize(msg, cause=nil)
  @cause = cause
  super(msg)
end

Instance Attribute Details

#causeObject (readonly) Also known as: wrapped_error

Returns the value of attribute cause.



96
97
98
# File 'lib/apt_control/jabber.rb', line 96

def cause
  @cause
end

Instance Method Details

#set_backtrace(bt) ⇒ Object



104
105
106
107
108
109
110
# File 'lib/apt_control/jabber.rb', line 104

def set_backtrace(bt)
  if cause
    bt << "cause: #{cause.class.name}: #{cause}"
    bt.concat cause.backtrace
  end
  super(bt)
end