Exception: Net::SNMP::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Net::SNMP::Error
- Defined in:
- lib/net/snmp/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errno ⇒ Object
Returns the value of attribute errno.
-
#snmp_err ⇒ Object
Returns the value of attribute snmp_err.
-
#snmp_msg ⇒ Object
Returns the value of attribute snmp_msg.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Error
constructor
A new instance of Error.
- #print ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/net/snmp/error.rb', line 5 def initialize(opts = {}) @status = opts[:status] @fiber = opts[:fiber] if opts[:session] @errno = opts[:session].errno @snmp_err = opts[:session].snmp_err @snmp_msg = opts[:session]. end print end |
Instance Attribute Details
#errno ⇒ Object
Returns the value of attribute errno.
4 5 6 |
# File 'lib/net/snmp/error.rb', line 4 def errno @errno end |
#snmp_err ⇒ Object
Returns the value of attribute snmp_err.
4 5 6 |
# File 'lib/net/snmp/error.rb', line 4 def snmp_err @snmp_err end |
#snmp_msg ⇒ Object
Returns the value of attribute snmp_msg.
4 5 6 |
# File 'lib/net/snmp/error.rb', line 4 def snmp_msg @snmp_msg end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/net/snmp/error.rb', line 4 def status @status end |
Instance Method Details
#print ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/net/snmp/error.rb', line 16 def print puts "SNMP Error: #{self.class.to_s}" puts "message = #{}" puts "status = #{@status}" puts "errno = #{@errno}" puts "snmp_err = #{@snmp_err}" puts "snmp_msg = #{@snmp_msg}" end |