Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


oracle.ifs.fdk
Class FdkException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byoracle.ifs.fdk.FdkException

All Implemented Interfaces:
java.io.Serializable

public class FdkException
extends java.lang.Exception
implements java.io.Serializable

The exception thrown by the framework.


Method Summary
java.lang.String getDetailedErrorCode()
Returns the detailed error code that may provide more information about the error.
java.lang.String getErrorCode()
Returns the main error code.
FdkExceptionEntry[] getExceptionEntries()
If this is an aggregate exception, it will return the individual entries, otherwise it returns null.
NamedValue[] getInfo()
Returns the optional info for this error.
static FdkException getInstance(java.lang.String detailedErrorCode, NamedValue[] info)
Constructs a new instance.
static FdkException getInstance(java.lang.String detailedErrorCode, java.lang.Throwable cause, NamedValue[] info)
Maps any Throwable to and FdkException, setting the error code explicitly.
static FdkException getInstance(java.lang.Throwable cause)
Maps any Throwable to an FdkException.
static FdkException getInstance(java.lang.Throwable cause, NamedValue[] info)
Maps any Throwable to an FdkException.
static FdkException getInstance(java.lang.Throwable cause, NamedValue[] info, boolean log)
Gives control over what needs to be logged.
java.lang.String getServerStackTraceId()
Returns the server stack trace ID for this exception.
java.util.Map infoMap()
Returns the options info for this error as a map.
void printLocalizedStackTrace(java.io.PrintStream stream)
Prints the stack trace of this FdkException to the specified PrintStream.
void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace of this FdkException to the specified PrintWriter.
java.lang.String toLogString(boolean includeStackTraces)
Returns a string representation of this exception.
java.lang.String toLogString(boolean includeMainStackTrace, boolean includeEntryStackTraces)
Returns a string representation of this exception.
java.lang.String toString()
Returns a minimal string representation of this exception (ERROR_CODE:DETAILED_ERROR_CODE).

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getDetailedErrorCode

public java.lang.String getDetailedErrorCode()
Returns the detailed error code that may provide more information about the error. If a detailed error code is not available, the same value as the main error code will be returned.

getErrorCode

public java.lang.String getErrorCode()
Returns the main error code.

getExceptionEntries

public FdkExceptionEntry[] getExceptionEntries()
If this is an aggregate exception, it will return the individual entries, otherwise it returns null.

getInfo

public NamedValue[] getInfo()
Returns the optional info for this error.

getInstance

public static FdkException getInstance(java.lang.String detailedErrorCode,
                                       NamedValue[] info)
Constructs a new instance.
Parameters:
detailedErrorCode - The detailed error code.
info - The optional info about the error. It can be null.

getInstance

public static FdkException getInstance(java.lang.String detailedErrorCode,
                                       java.lang.Throwable cause,
                                       NamedValue[] info)
Maps any Throwable to and FdkException, setting the error code explicitly.
Parameters:
detailedErrorCode - The detailed error code.
cause - The exception that was the cause for this exception.
info - The optional info about the error. It can be null.

getInstance

public static FdkException getInstance(java.lang.Throwable cause)
Maps any Throwable to an FdkException. The additional information about the error will automatically be extracted from the cause exception if possible.
Parameters:
cause - The Throwable that occured.

getInstance

public static FdkException getInstance(java.lang.Throwable cause,
                                       NamedValue[] info)
Maps any Throwable to an FdkException. The additional information about the error will automatically be extracted from the cause exception if possible and merged with the provided info in the constructor.
Parameters:
cause - The Throwable that occured.
info - The additional information that should be merged with the info extracted. This information is considered the master, identical entries in the extracted information will be ignored. Can be null.

getInstance

public static FdkException getInstance(java.lang.Throwable cause,
                                       NamedValue[] info,
                                       boolean log)
Gives control over what needs to be logged. Note that this method may still decide to log based on the severity of the error.
Parameters:
cause - The exception that was the cause for this exception.
info - The additional information that should be merged with the info extracted. This information is considered the master, identical entries in the extracted information will be ignored. Can be null.
log - If true the exception will always be logged, otherwise the exception may be logged if the implementation decides the error is important enough to be logged.

getServerStackTraceId

public java.lang.String getServerStackTraceId()
Returns the server stack trace ID for this exception. This method is useful when invoking the API remotely. For in-process calls the cause exception (if any) is always available by calling getCause().

infoMap

public java.util.Map infoMap()
Returns the options info for this error as a map.

printLocalizedStackTrace

public void printLocalizedStackTrace(java.io.PrintStream stream)
Prints the stack trace of this FdkException to the specified PrintStream. This provides extra information for debugging.
Parameters:
stream - The PrintStream to write to.

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace of this FdkException to the specified PrintWriter. This provides extra information for debugging.

toLogString

public java.lang.String toLogString(boolean includeStackTraces)
Returns a string representation of this exception. Logging the result of this method should be guarded by the log level as the string computation is significant.
Parameters:
includeStackTraces - If true a more verbose string will be generated which also includes all the stack traces for the main exception as well as any entries.

toLogString

public java.lang.String toLogString(boolean includeMainStackTrace,
                                    boolean includeEntryStackTraces)
Returns a string representation of this exception. Logging the result of this method should be guarded by the log level as the string computation is significant.
Parameters:
includeMainStackTrace - A boolean, true will include all the stack stack traces for the main FdkException.
includeEntryStackTraces - A boolean, true will include all the stack traces for any entries.

toString

public java.lang.String toString()
Returns a minimal string representation of this exception (ERROR_CODE:DETAILED_ERROR_CODE). For a detailed string representation see toLogString()

Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


Copyright © 2002, 2005, Oracle. All rights reserved.