FileDocCategorySizeDatePackage
SnmpStatusException.javaAPI DocJava SE 5 API3427Fri Aug 26 14:55:04 BST 2005com.sun.jmx.snmp

SnmpStatusException

public class SnmpStatusException extends Exception implements SnmpDefinitions
Reports an error which occurred during a get/set operation on a mib node. This exception includes a status error code as defined in the SNMP protocol.

This API is a Sun Microsystems internal API and is subject to change without notice.

version
3.2 11/05/98
author
Sun Microsystems, Inc

Fields Summary
public static final int
noSuchName
Error code as defined in RFC 1448 for: noSuchName.
public static final int
badValue
Error code as defined in RFC 1448 for: badValue.
public static final int
readOnly
Error code as defined in RFC 1448 for: readOnly.
public static final int
noAccess
Error code as defined in RFC 1448 for: noAccess.
public static final int
noSuchInstance
Error code for reporting a no such instance error.
public static final int
noSuchObject
Error code for reporting a no such object error.
private int
errorStatus
Status of the error.
private int
errorIndex
Index of the error. If different from -1, indicates the index where the error occurs.
Constructors Summary
public SnmpStatusException(int status)
Constructs a new SnmpStatusException with the specified status error.

param
status The error status.

  
                       
       
	errorStatus = status ;
    
public SnmpStatusException(int status, int index)
Constructs a new SnmpStatusException with the specified status error and status index.

param
status The error status.
param
index The error index.

	errorStatus = status ;
	errorIndex = index ;
    
public SnmpStatusException(String s)
Constructs a new SnmpStatusException with an error message. The error status is set to 0 (noError) and the index to -1.

param
s The error message.

	super(s);
    
public SnmpStatusException(SnmpStatusException x, int index)
Constructs a new SnmpStatusException with an error index.

param
x The original SnmpStatusException.
param
index The error index.

	super(x.getMessage());
	errorStatus= x.errorStatus;
	errorIndex= index;
    
Methods Summary
public intgetErrorIndex()
Returns the index of the error. A value of -1 means that the index is not known/applicable.

return
The error index.

	return errorIndex;
    
public intgetStatus()
Return the error status.

return
The error status.

	return errorStatus ;