com.adventnet.snmp.mibs
Class ErrorObject

java.lang.Object
  extended by com.adventnet.snmp.mibs.ErrorObject

public class ErrorObject
extends java.lang.Object

This class represents the specific error message. The line number, column number and the error present in the particular location of the MIB file is stored in this object.

Consider the following error message

ERR-168     The IMPLIED keyword can be associated only with the last object in the INDEX clause.
lineNo     colNo     Error
329 8 The index 'advNumIndex' defined as IMPLIED, is not the last object

In the above error message, the error

329              8               The index 'advNumIndex' defined as IMPLIED, is not the last object

will be stored as a single ErrorObject object.

The ErrorObject instance can be obtained as follows

 Vector errorObjects = mibErrMsg.getErrorObjects();
 ErrorObject eob = (ErrorObject)errorObjects.firstElement();
 
where mibErrMsg is an instance of MibErrorMessages

Since:
AdventNet SNMP API 4
See Also:
MibErrorMessages

Field Summary
(package private)  int colNo
           
(package private)  java.lang.String error
           
(package private)  int lineNo
           
 
Constructor Summary
ErrorObject()
           
ErrorObject(int line, int col, java.lang.String err)
           
 
Method Summary
 int getColumnNo()
          Returns the column number of the error.
 java.lang.String getError()
          Returns the specific error message.
 int getLineNo()
          Returns the line number of the error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineNo

int lineNo

colNo

int colNo

error

java.lang.String error
Constructor Detail

ErrorObject

ErrorObject()

ErrorObject

ErrorObject(int line,
            int col,
            java.lang.String err)
Method Detail

getLineNo

public int getLineNo()
Returns the line number of the error. Considering the example error message given in the introduction of this class this method will return 329.

Returns:
int - the line number

getColumnNo

public int getColumnNo()
Returns the column number of the error. Considering the example error message given in the introduction of this class this method will return 8.

Returns:
int - the column number

getError

public java.lang.String getError()
Returns the specific error message. Considering the example error message given in the introduction of this class this method will return the String "The index 'advNumIndex' defined as IMPLIED, is not the last object".

Returns:
String - the specific error