Exception: Net::SNMP::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Net::SNMP::Error
- Includes:
- Debug
- 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
Methods included from Debug
Constructor Details
#initialize(opts = {}) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/net/snmp/error.rb', line 7 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.
6 7 8 |
# File 'lib/net/snmp/error.rb', line 6 def errno @errno end |
#snmp_err ⇒ Object
Returns the value of attribute snmp_err.
6 7 8 |
# File 'lib/net/snmp/error.rb', line 6 def snmp_err @snmp_err end |
#snmp_msg ⇒ Object
Returns the value of attribute snmp_msg.
6 7 8 |
# File 'lib/net/snmp/error.rb', line 6 def snmp_msg @snmp_msg end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/net/snmp/error.rb', line 6 def status @status end |
Instance Method Details
#print ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/net/snmp/error.rb', line 18 def print = <<-EOF SNMP Error: #{self.class.to_s} message = #{} status = #{@status} errno = #{@errno} snmp_err = #{@snmp_err} snmp_msg = #{@snmp_msg} EOF error(.gsub /^\s*/, '') end |