|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
oracle.portal.PortalException
public class PortalException
The PortalException class represents the Base exception that the Portal Java service library will throw. It encapsulates the NLS needs of the service library by taking the name of a resource bundle, and the name of the associate resource, instead of a literal text string for any error message to be produced. Callers wanting to display the error contained in the Exception can call getMessage() or a new method getMessage(Locale) in order to extract the error message string contained within the exception. Instances of this class can be "chained" together. Whenever one exception is caught and a second one is raised, the second one should be created by specifying the first one as the cause. This avoids the loss of information that is typical in these situations. Hypothetical code snippet: catch (ClassCastException e) { throw new PortalClassCastException(resource, name, e); } The printStackTrace methods in this class override those in the Exception class so that the entire exception chain is displayed. NOTE : If your application lies under different classloader you would have to extend from oracle.portal.PortalException
| Constructor Summary | |
|---|---|
PortalException(java.lang.String msg)
Deprecated. |
|
PortalException(java.lang.String resource,
java.lang.String name)
Constructor. |
|
PortalException(java.lang.String resource,
java.lang.String name,
java.lang.Object[] args)
Constructor. |
|
PortalException(java.lang.String resource,
java.lang.String name,
java.lang.Object[] args,
java.lang.Throwable cause)
Construct a Portal exception with a complete set of parameters. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Get the cause of this exception. |
java.lang.String |
getMessage()
Get the message from the Exception. |
java.lang.String |
getMessage(java.util.Locale locale)
Get the message from the Exception in the requested Locale. |
void |
printStackTrace()
Print this exception and its backtrace to the standard error stream. |
void |
printStackTrace(java.io.PrintStream stream)
Print this exception and its backtrace to the given stream. |
void |
printStackTrace(java.io.PrintWriter writer)
Print this exception and its backtrace to the given print writer. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PortalException(java.lang.String resource,
java.lang.String name,
java.lang.Object[] args,
java.lang.Throwable cause)
resource - the name of the resource bundle with the error string.name - the name of the resource within the resource bundle.args - optional arguments formatted into the msg via MessageFormat.cause - optional cause of this exception.
public PortalException(java.lang.String resource,
java.lang.String name,
java.lang.Object[] args)
resource - the name of the resource bundle with the error string.name - the name of the resource within the resource bundle.args - optional arguments formatted into the msg via MessageFormat.
public PortalException(java.lang.String resource,
java.lang.String name)
resource - the name of the resource bundle with the error string.name - the name of the resource within the resource bundle.public PortalException(java.lang.String msg)
| Method Detail |
|---|
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String getMessage(java.util.Locale locale)
getMessage in interface oracle.webdb.utils.PortalExceptionIFlocale - the locale to use to extract the error message.
public java.lang.Throwable getCause()
getCause in class java.lang.Throwablepublic void printStackTrace()
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream stream)
printStackTrace in class java.lang.Throwablestream - the print stream to use for output.public void printStackTrace(java.io.PrintWriter writer)
printStackTrace in class java.lang.Throwablewriter - the print writer to use for output.
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||