Package javax.portlet
Class PortletException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.portlet.PortletException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PortletModeException,PortletSecurityException,ReadOnlyException,UnavailableException,UnmodifiableException,ValidatorException,WindowStateException
public class PortletException extends java.lang.ExceptionThePortletExceptionclass defines a general exception that a portlet can throw when it is unable to perform its operation successfully.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Throwablecause
-
Constructor Summary
Constructors Constructor Description PortletException()Constructs a new portlet exception.PortletException(java.lang.String text)Constructs a new portlet exception with the given text.PortletException(java.lang.String text, java.lang.Throwable cause)Constructs a new portlet exception when the portlet needs to do the following: throw an exception include the "root cause" exception include a description messagePortletException(java.lang.Throwable cause)Constructs a new portlet exception when the portlet needs to throw an exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ThrowablegetCause()Returns the cause of this throwable ornullif the cause is nonexistent or unknown.voidprintStackTrace()Prints the stack trace of this exception to the standard error stream.voidprintStackTrace(java.io.PrintStream out)Prints the stack trace of this exception to the specified print stream.voidprintStackTrace(java.io.PrintWriter out)Prints the stack trace of this exception to the specified print writer.
-
-
-
Constructor Detail
-
PortletException
public PortletException()
Constructs a new portlet exception.
-
PortletException
public PortletException(java.lang.String text)
Constructs a new portlet exception with the given text. The portlet container may use the text write it to a log.- Parameters:
text- the exception text
-
PortletException
public PortletException(java.lang.String text, java.lang.Throwable cause)Constructs a new portlet exception when the portlet needs to do the following:- throw an exception
- include the "root cause" exception
- include a description message
- Parameters:
text- the exception textcause- the root cause
-
PortletException
public PortletException(java.lang.Throwable cause)
Constructs a new portlet exception when the portlet needs to throw an exception. The exception's message is based on the localized message of the underlying exception.- Parameters:
cause- the root cause
-
-
Method Detail
-
printStackTrace
public void printStackTrace()
Prints the stack trace of this exception to the standard error stream.- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream out)
Prints the stack trace of this exception to the specified print stream.- Overrides:
printStackTracein classjava.lang.Throwable- Parameters:
out- thePrintStreamto be used for output
-
printStackTrace
public void printStackTrace(java.io.PrintWriter out)
Prints the stack trace of this exception to the specified print writer.- Overrides:
printStackTracein classjava.lang.Throwable- Parameters:
out- thePrintWriterto be used for output
-
getCause
public java.lang.Throwable getCause()
Returns the cause of this throwable ornullif the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)This implementation returns the cause that was supplied via one of the constructors requiring a Throwable.
- Overrides:
getCausein classjava.lang.Throwable- Returns:
- the cause of this throwable or
nullif the cause is nonexistent or unknown.
-
-