Top Description Fields Constructors
javax.portlet

public Class PortletException

extends Exception
Class Inheritance
Known Direct Subclasses
javax.portlet.PortletModeException, javax.portlet.PortletSecurityException, javax.portlet.ReadOnlyException, javax.portlet.UnavailableException, javax.portlet.ValidatorException, javax.portlet.WindowStateException

The PortletException class defines a general exception that a portlet can throw when it is unable to perform its operation successfully.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
PortletException()

Constructs a new portlet exception.

public
PortletException(String
the exception text
text
)

Constructs a new portlet exception with the given text.

public
PortletException(String
the exception text
text
,
Throwable
the root cause
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
public
PortletException(Throwable
the root cause
cause
)

Constructs a new portlet exception when the portlet needs to throw an exception.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

PortletExceptionback to summary
public PortletException()

Constructs a new portlet exception.

PortletExceptionback to summary
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.

Parameters
text:String

the exception text

PortletExceptionback to summary
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
Parameters
text:String

the exception text

cause:Throwable

the root cause

PortletExceptionback to summary
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.

Parameters
cause:Throwable

the root cause