Exception: Netconf::RpcError
- Inherits:
-
StandardError
- Object
- StandardError
- Netconf::RpcError
- Defined in:
- lib/net/netconf/exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#rsp ⇒ Object
readonly
Returns the value of attribute rsp.
-
#trans ⇒ Object
readonly
Returns the value of attribute trans.
Instance Method Summary collapse
-
#initialize(trans, cmd, rsp) ⇒ RpcError
constructor
A new instance of RpcError.
- #to_s ⇒ Object
Constructor Details
#initialize(trans, cmd, rsp) ⇒ RpcError
Returns a new instance of RpcError.
16 17 18 19 |
# File 'lib/net/netconf/exception.rb', line 16 def initialize( trans, cmd, rsp ) @trans = trans @cmd = cmd; @rsp = rsp; end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
14 15 16 |
# File 'lib/net/netconf/exception.rb', line 14 def cmd @cmd end |
#rsp ⇒ Object (readonly)
Returns the value of attribute rsp.
14 15 16 |
# File 'lib/net/netconf/exception.rb', line 14 def rsp @rsp end |
#trans ⇒ Object (readonly)
Returns the value of attribute trans.
13 14 15 |
# File 'lib/net/netconf/exception.rb', line 13 def trans @trans end |
Instance Method Details
#to_s ⇒ Object
21 22 23 |
# File 'lib/net/netconf/exception.rb', line 21 def to_s "RPC command error: #{cmd.first_element_child.name}\n#{rsp.to_xml}" end |