Exception: Netconf::RpcError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/net/netconf/exception.rb

Direct Known Subclasses

CommitError, EditError, LockError, ValidateError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trans, cmd, rsp) ⇒ RpcError

Returns a new instance of RpcError


15
16
17
18
19
# File 'lib/net/netconf/exception.rb', line 15

def initialize(trans, cmd, rsp)
  @trans = trans
  @cmd = cmd
  @rsp = rsp
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd


13
14
15
# File 'lib/net/netconf/exception.rb', line 13

def cmd
  @cmd
end

#rspObject (readonly)

Returns the value of attribute rsp


13
14
15
# File 'lib/net/netconf/exception.rb', line 13

def rsp
  @rsp
end

#transObject (readonly)

Returns the value of attribute trans


12
13
14
# File 'lib/net/netconf/exception.rb', line 12

def trans
  @trans
end

Instance Method Details

#to_sObject


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