javax.portlet
Class PortletException
java.lang.Exception
javax.portlet.PortletException
public class PortletException
extends java.lang.Exception
The PortletException
class defines a general exception
that a portlet can throw when it is unable to perform its operation
successfully.
PortletException() - Constructs a new portlet exception.
|
PortletException(String text) - Constructs a new portlet exception with the given text.
|
PortletException(String text, 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(Throwable cause) - Constructs a new portlet exception when the portlet needs to throw an
exception.
|
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.
|
PortletException
public PortletException()
Constructs a new portlet exception.
PortletException
public PortletException(String text)
Constructs a new portlet exception with the given text. The
portlet container may use the text write it to a log.
text
- the exception text
PortletException
public PortletException(String text,
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
text
- the exception textcause
- the root cause
PortletException
public PortletException(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.
getCause
public Throwable getCause()
Returns the cause of this throwable or
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.
- the cause of this throwable or
null
if the
cause is nonexistent or unknown.
printStackTrace
public void printStackTrace()
Prints the stack trace of this exception to the standard error stream.
printStackTrace
public void printStackTrace(java.io.PrintStream out)
Prints the stack trace of this exception to the specified print stream.
out
- the PrintStream
to be used for output
printStackTrace
public void printStackTrace(java.io.PrintWriter out)
Prints the stack trace of this exception to the specified print writer.
out
- the PrintWriter
to be used for output