Exception: Net::SSH::Simple::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/net/ssh/simple.rb

Overview

Error that occured during a Net::SSH::Simple operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, e = $!) ⇒ Error

Returns a new instance of Error.



697
698
699
700
701
# File 'lib/net/ssh/simple.rb', line 697

def initialize(msg, e=$!)
  super(msg)
  @wrapped = e
  @result  = msg[1]
end

Instance Attribute Details

#resultObject (readonly)

Result of the interrupted operation (may be incomplete!).



695
696
697
# File 'lib/net/ssh/simple.rb', line 695

def result
  @result
end

#wrappedObject (readonly)

Reference to the underlying Exception



692
693
694
# File 'lib/net/ssh/simple.rb', line 692

def wrapped
  @wrapped
end

Instance Method Details

#to_sObject



703
704
705
# File 'lib/net/ssh/simple.rb', line 703

def to_s
  "#{@wrapped} @ #{@result}"
end