public class PortletException
extends java.lang.Exception
PortletException
class defines a general exception
that a portlet can throw when it is unable to perform its operation
successfully.Modifier and Type | Field and Description |
---|---|
private java.lang.Throwable |
cause |
Constructor and 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 message
|
PortletException(java.lang.Throwable cause)
Constructs a new portlet exception when the portlet needs to throw an
exception.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getCause()
Returns the cause of this throwable or
null if the
cause is nonexistent or unknown. |
void |
printStackTrace()
Prints the stack trace of this exception to the standard error stream.
|
void |
printStackTrace(java.io.PrintStream out)
Prints the stack trace of this exception to the specified print stream.
|
void |
printStackTrace(java.io.PrintWriter out)
Prints the stack trace of this exception to the specified print writer.
|
public PortletException()
public PortletException(java.lang.String text)
text
- the exception textpublic PortletException(java.lang.String text, java.lang.Throwable cause)
text
- the exception textcause
- the root causepublic PortletException(java.lang.Throwable cause)
cause
- the root causepublic void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream out)
printStackTrace
in class java.lang.Throwable
out
- the PrintStream
to be used for outputpublic void printStackTrace(java.io.PrintWriter out)
printStackTrace
in class java.lang.Throwable
out
- the PrintWriter
to be used for outputpublic java.lang.Throwable getCause()
null
if 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.
getCause
in class java.lang.Throwable
null
if the
cause is nonexistent or unknown.