HOME

com.ireasoning.util
Class MibParseException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.text.ParseException
              extended bycom.ireasoning.util.MibParseException
All Implemented Interfaces:
Serializable

public class MibParseException
extends ParseException

Signals that an error has been reached unexpectedly while parsing MIB file

See Also:
Serialized Form

Field Summary
static int GENERIC
          Error code: Generic error
static int IMPORT_NOT_FOUND
          Error code: the needed MIB module not found
static int SYNTAX_ERROR
          Error code: Syntax error in the MIB
 
Constructor Summary
MibParseException(String s, int lineNumber)
          Constructs a MibParseException with the specified detail message and offset.
 
Method Summary
 int getErrorCode()
          Return the error code of parsing failure
 int getErrorLineNumber()
           
 String getImportMibModuleName()
          If the error code is IMPORT_NOT_FOUND, it's the module name of MIB which need to be loaded beforehand.
 String getMibModuleName()
          Returns the Mib module name.
 void setErrorCode(int code)
          Sets the error code
 void setImportMibModuleName(String name)
           
 void setMibModuleName(String name)
          Sets the Mib module name
 
Methods inherited from class java.text.ParseException
getErrorOffset
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GENERIC

public static final int GENERIC
Error code: Generic error

See Also:
Constant Field Values

IMPORT_NOT_FOUND

public static final int IMPORT_NOT_FOUND
Error code: the needed MIB module not found

See Also:
Constant Field Values

SYNTAX_ERROR

public static final int SYNTAX_ERROR
Error code: Syntax error in the MIB

See Also:
Constant Field Values
Constructor Detail

MibParseException

public MibParseException(String s,
                         int lineNumber)
Constructs a MibParseException with the specified detail message and offset.

Parameters:
s - error message
lineNumber - the line number of error occurred
Method Detail

getErrorLineNumber

public int getErrorLineNumber()

getMibModuleName

public String getMibModuleName()
Returns the Mib module name. it's the module name of MIB which is being parsed. If the MIB file is corrupted and no module name can be obtained, it returns the MIB file name if it's available.


setMibModuleName

public void setMibModuleName(String name)
Sets the Mib module name


getImportMibModuleName

public String getImportMibModuleName()
If the error code is IMPORT_NOT_FOUND, it's the module name of MIB which need to be loaded beforehand.


setImportMibModuleName

public void setImportMibModuleName(String name)

getErrorCode

public int getErrorCode()
Return the error code of parsing failure


setErrorCode

public void setErrorCode(int code)
Sets the error code


HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.