|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--oracle.ifs.common.IfsException
An IfsException represents an iFS error condition.
Each IfsException has an integer error code that specifies the type of error encountered.
An IfsException may also have an array of object parameters that can be
substituted into a string (obtained from the iFS resource bundle) using
java.text.MessageFormat
to produce a more descriptive,
localized error message.
An exception often leads to another higher-level exception, which in turn
may result in even higher-level exceptions. Although only the top-level
exception is presented to the application by the iFS API, an IfsException
keeps track of the underlying, or "nested", exceptions (or more precisely,
the nested java.lang.Throwable
s). For any IfsException, the
immediately underlying Throwable can be obtained by calling the method
getNestedThrowable
.
Constructor Summary | |
IfsException(int errorCode)
Constructs an IfsException. |
|
IfsException(int errorCode,
java.lang.Object[] parameters)
Constructs an IfsException. |
|
IfsException(int errorCode,
java.lang.Object[] parameters,
java.lang.Throwable nestedThrowable)
Constructs an IfsException. |
|
IfsException(int errorCode,
java.lang.Throwable nestedThrowable)
Constructs an IfsException. |
Method Summary | |
boolean |
containsErrorCode(int errorCode)
Gets whether this IfsException or any nested IfsExceptions have the specified error code. |
int |
getErrorCode()
Gets the error code of this IfsException. |
java.lang.String |
getLocalizedMessage()
Gets the description of this IfsException for the default locale of the Java VM. |
java.lang.String |
getLocalizedMessage(LibrarySessionInterface session)
Gets the description of this IfsException for the locale of the specified session's Localizer. |
java.lang.String |
getLocalizedMessage(Localizer localizer)
Gets the description of this IfsException for the locale of the specified Localizer. |
java.lang.String |
getMessage()
Gets the US English description of this IfsException. |
IfsException |
getNestedIfsException(int errorCode)
Gets a nested IfsException that matches the specified error code. |
java.lang.Throwable |
getNestedThrowable()
Gets the Throwable that led to this IfsException. |
java.lang.Object[] |
getParameters()
Gets the parameter values for the error message. |
static boolean |
isVerboseMessage()
Gets whether toString and toLocalizedString
produces verbose messages. |
void |
printLocalizedStackTrace()
Prints the stack trace of this IfsException to the standard error stream, using the default locale of the Java VM. |
void |
printLocalizedStackTrace(LibrarySessionInterface session)
Prints the stack trace of this IfsException to the standard error stream, using the locale of the specified session's Localizer. |
void |
printLocalizedStackTrace(Localizer localizer)
Prints the stack trace of this IfsException to the standard error stream, using the locale of the specified Localizer. |
void |
printLocalizedStackTrace(java.io.PrintStream stream)
Prints the stack trace of this IfsException to the specified PrintStream, using the default locale of the Java VM. |
void |
printLocalizedStackTrace(java.io.PrintStream stream,
LibrarySessionInterface session)
Prints the stack trace of this IfsException to the specified PrintStream, using the locale of the specified session's Localizer. |
void |
printLocalizedStackTrace(java.io.PrintStream stream,
Localizer localizer)
Prints the stack trace of this IfsException to the specified PrintStream, using the locale of the specified Localizer. |
void |
printLocalizedStackTrace(java.io.PrintWriter writer)
Prints the stack trace of this IfsException to the specified PrintWriter, using the default locale of the Java VM. |
void |
printLocalizedStackTrace(java.io.PrintWriter writer,
LibrarySessionInterface session)
Prints the stack trace of this IfsException to the specified PrintWriter, using the locale of the specified session's Localizer. |
void |
printLocalizedStackTrace(java.io.PrintWriter writer,
Localizer localizer)
Prints the stack trace of this IfsException to the specified PrintWriter, using the locale of the specified Localizer. |
void |
printStackTrace()
Prints the stack trace of this IfsException to the standard error stream, using US English. |
void |
printStackTrace(java.io.PrintStream stream)
Prints the stack trace of this IfsException to the specified PrintStream, using US English. |
void |
printStackTrace(java.io.PrintWriter writer)
Prints the stack trace of this IfsException to the specified PrintWriter, using US English. |
static void |
setVerboseMessage(boolean verbose)
Specifies whether toString and toLocalizedString
produces verbose messages. |
java.lang.String |
toLocalizedString()
Represents this IfsException as a localized string, using the default locale of the Java VM. |
java.lang.String |
toLocalizedString(LibrarySessionInterface session)
Represents this IfsException as a localized string, using the locale of the specified session's Localizer. |
java.lang.String |
toLocalizedString(Localizer localizer)
Represents this IfsException as a localized string, using the locale of the specified Localizer. |
java.lang.String |
toString()
Represents this IfsException as a US English string. |
Constructor Detail |
public IfsException(int errorCode, java.lang.Object[] parameters, java.lang.Throwable nestedThrowable)
errorCode
- the error codeparameters
- an array of Objects to be substituted into
the resource bundle message using using
java.text.MessageFormat
to
produce a localized error messagenestedThrowable
- the Throwable that led to this IfsExceptionpublic IfsException(int errorCode, java.lang.Throwable nestedThrowable)
This constructor variant is used when the error message for the specified error code has no parameters.
errorCode
- the error codenestedThrowable
- the Throwable that led to this IfsExceptionpublic IfsException(int errorCode, java.lang.Object[] parameters)
This constructor variant is used then the IfsException has no nested Throwable.
errorCode
- the error codeparameters
- an array of Objects to be substituted into
the resource bundle message using using
java.text.MessageFormat
to
produce a localized error messagepublic IfsException(int errorCode)
This constructor variant is used then the IfsException has no nested Throwable and the error message for the specified error code has no parameters.
errorCode
- the error codeMethod Detail |
public final int getErrorCode()
public final java.lang.Object[] getParameters()
public final java.lang.Throwable getNestedThrowable()
public final IfsException getNestedIfsException(int errorCode)
errorCode
- the specified error codepublic final boolean containsErrorCode(int errorCode)
errorCode
- the error code of interestpublic void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
printStackTrace
in class java.lang.Throwable
stream
- the PrintStreampublic void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
writer
- the PrintWriterpublic void printLocalizedStackTrace()
The default locale of the Java virtual machine is determined by
invoking the java.util.Locale.getDefault
method.
public void printLocalizedStackTrace(java.io.PrintStream stream)
The default locale of the Java virtual machine is determined by
invoking the java.util.Locale.getDefault
method.
stream
- the PrintStreampublic void printLocalizedStackTrace(java.io.PrintWriter writer)
The default locale of the Java virtual machine is determined by
invoking the java.util.Locale.getDefault
method.
writer
- the PrintWriterpublic void printLocalizedStackTrace(LibrarySessionInterface session)
session
- the sessionpublic void printLocalizedStackTrace(java.io.PrintStream stream, LibrarySessionInterface session)
stream
- the PrintStreamsession
- the sessionpublic void printLocalizedStackTrace(java.io.PrintWriter writer, LibrarySessionInterface session)
writer
- the PrintWritersession
- the sessionpublic void printLocalizedStackTrace(Localizer localizer)
localizer
- the Localizerpublic void printLocalizedStackTrace(java.io.PrintStream stream, Localizer localizer)
stream
- the PrintStreamlocalizer
- the Localizerpublic void printLocalizedStackTrace(java.io.PrintWriter writer, Localizer localizer)
writer
- the PrintWriterlocalizer
- the Localizerpublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
The default locale of the Java virtual machine is determined by
invoking the java.util.Locale.getDefault
method.
getLocalizedMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage(LibrarySessionInterface session)
session
- the sessionpublic java.lang.String getLocalizedMessage(Localizer localizer)
localizer
- the Localizerpublic java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.String toLocalizedString()
The default locale of the Java virtual machine is determined by
invoking the java.util.Locale.getDefault
method.
public java.lang.String toLocalizedString(LibrarySessionInterface session)
session
- the sessionpublic java.lang.String toLocalizedString(Localizer localizer)
localizer
- the Localizerpublic static final void setVerboseMessage(boolean verbose)
toString
and toLocalizedString
produces verbose messages.
Verbose messages include the messages of nested Throwables.
Verbose messages are produced by default.
verboseMessage
- whether the messages are verbosepublic static final boolean isVerboseMessage()
toString
and toLocalizedString
produces verbose messages.
Verbose messages include the messages of nested Throwables.
Verbose messages are produced by default.
|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |