Class SnmpTrapHelperException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.opennms.netmgt.scriptd.helper.SnmpTrapHelperException
-
- All Implemented Interfaces:
Serializable
public class SnmpTrapHelperException extends Exception
This class describes an exception associated with the SnmpTrapHelper class. If the described exception was caused by some other exception (e.g. an exception associated with the JoeSNMP library), that exception will be included as the "cause". The getMessage and printStackTrace methods are overridden, in order to describe the "cause" exception, where present.- Author:
- Jim Doble , OpenNMS.org
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SnmpTrapHelperException(String message)Construct an SnmpTrapHelperException with the specified message.SnmpTrapHelperException(String message, Throwable cause)Construct an SnmpTrapHelperException with the specified message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Get the message associated with this exception.voidprintStackTrace()Print the stack trace associated with this exception to System.err.voidprintStackTrace(PrintStream ps)Print the stack trace associated with this exception to the specified print stream.voidprintStackTrace(PrintWriter pw)Print the stack trace associated with this exception to the specified print writer.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
-
-
-
Constructor Detail
-
SnmpTrapHelperException
public SnmpTrapHelperException(String message)
Construct an SnmpTrapHelperException with the specified message.- Parameters:
message- The message to be associated with the exception.
-
-
Method Detail
-
getMessage
public String getMessage()
Get the message associated with this exception. If this exception has an associated cause exception, the message associated with the cause exception is appended.- Overrides:
getMessagein classThrowable- Returns:
- The message associated with this exception.
-
printStackTrace
public void printStackTrace(PrintStream ps)
Print the stack trace associated with this exception to the specified print stream. If this exception has an associated cause exception, the stack trace associated with the cause exception is printed.- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace()
Print the stack trace associated with this exception to System.err. If this exception has an associated cause exception, the stack trace associated with the cause exception is printed.- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace(PrintWriter pw)
Print the stack trace associated with this exception to the specified print writer. If this exception has an associated cause exception, the stack trace associated with the cause exception is printed.- Overrides:
printStackTracein classThrowable- Parameters:
pw- The print writer to which the stack trace should be printed.
-
-