class SNMP::ResponseError

Attributes

error_status[R]

Public Class Methods

new(error) click to toggle source

Accepts either a string (from SNMP::PDU.error_status) or one of SNMP::EndOfMibView, SNMP::NoSuchObject, or SNMP::NoSuchInstance

   # File lib/snmp4em/extensions/snmp/response_error.rb
 7 def initialize(error)
 8   if [SNMP::EndOfMibView, SNMP::NoSuchObject, SNMP::NoSuchInstance].include? error
 9     @error_status = error.asn1_type.to_sym
10   else
11     @error_status = error.to_sym
12   end
13 end

Public Instance Methods

rubify() click to toggle source
   # File lib/snmp4em/extensions/snmp/response_error.rb
20 def rubify
21   return nil
22 end
to_s() click to toggle source

String representation of this error

   # File lib/snmp4em/extensions/snmp/response_error.rb
16 def to_s
17   @error_status.to_s
18 end