High-Level API Error Messages

 

To catch and report SnmpErrors, AdventNet SnmpAPI defines the ErrorMessages class, which informs the user about the actual cause of error. These messages are set in the ErrorMessages class for the respective error codes. These messages can be changed by the user according to their requirement and can be thrown as output using the method getErrorString().

 

S.No. Error Messages

Classes

When it occurs

1

OID Not Specified

SnmpTarget

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when the OIDs are not specified before making a request. This is also applicable for trapOID.

2

Session Remote Host Unknown.

SnmpTarget

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when the session's remote hostname is not specified in the request.

3

Security Exception connecting to remote host

SnmpTarget

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when the security exception is thrown while connecting to a remote host.

4

SNMP not initialized

SnmpTarget

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when the class SnmpAPI is not initialized.

5

Invalid Version Number

SnmpTarget

SnmpTable

SnmpPoller

This is set when an invalid version is specified on the target.

6

Agent Returned Empty Varbind(s)

SnmpTarget

SnmpTable

SnmpPoller

This is set when the agent returns an empty VarBind.

7

Remote IP address not specified.

SnmpTarget

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when the remote IP address is not specified.

8

Invalid context Name

SnmpTarget,

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when an invalid context name is specified. This is a v3 error code constant.

9

Invalide context ID

SnmpTarget,

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when an invalid context ID is specified. This is a v3 error code constant.

10

Unknown Error

SnmpTarget,

SnmpRequestServer

SnmpTable

SnmpPoller

This is set when an unknown error not listed in the code occurs.

11

Input Output Error While sending PDU

SnmpRequestServer

This is set when an IO Error occurs while connecting to a remote host.

12

Request Timed Out

SnmpTarget

SnmpTable

SnmpPoller

This is set when the agent timesoutwithout any response after the request.

13

MIB node unavailable for OID

SnmpRequestServer

This is set when the Mib-Node is not available for a specified OID during a SET request.

14

OID not a leaf node.

SnmpRequestServer

This is set when an OID is not a leaf node.

15

Error creating variable

SnmpRequestServer

This is set when an error occurs while creating a variable.

16

Invalid generic type for trap

SnmpTarget

This is set when an invalid generic type value is specified.

17

Invalid Non-Repeaters value

SnmpTarget

This is set when an invalid Nonrepeater value is specified.

18

Discover failed

SnmpServer

This is set when discovery fails.

19

Time Synchronization failed

SnmpServer

This is set when Time Synchronization fails.

 

 

 



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.