java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.snmp4j.MessageException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UnsupportedAddressClassException
The
MessageException
represents information about an exception
occurred during message processing. The associated
StatusInformation
object provides (if present) detailed
information about the error that occurred and the status of the processed
message.- Version:
- 1.0.1
- Author:
- Frank Fock
- See Also:
-
Constructor Summary
ConstructorDescriptionMessageException
(String message) MessageException
(String message, int snmp4jErrorStatus) Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.MessageException
(String message, int snmp4jErrorStatus, Throwable rootCause) Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.MessageException
(StatusInformation status) Creates aMessageException
from aStatusInformation
object. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the SNMP4J specific error status associated with this exception.void
setStatusInformation
(StatusInformation statusInformation) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MessageException
public MessageException() -
MessageException
Creates aMessageException
from aStatusInformation
object.- Parameters:
status
- aStatusInformation
instance.
-
MessageException
-
MessageException
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.- Parameters:
message
- an error message.snmp4jErrorStatus
- aMessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
.- Since:
- 2.2
-
MessageException
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.- Parameters:
message
- an error message.snmp4jErrorStatus
- aMessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
.rootCause
- the root cause represented by a Throwable.- Since:
- 2.2.6
-
-
Method Details
-
getStatusInformation
-
setStatusInformation
-
getSnmp4jErrorStatus
public int getSnmp4jErrorStatus()Gets the SNMP4J specific error status associated with this exception.- Returns:
- a
MessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
. - Since:
- 2.2
-