public class FdkException extends Exception implements Serializable
Constructor and Description |
---|
FdkException()
Constructor required to be a Java Bean.
|
FdkException(String detailedErrorCode,
String errorCode,
FdkExceptionEntry[] exceptionEntries,
NamedValue[] info,
String serverStackTraceId)
Constructor for WebLogic web services.
|
Modifier and Type | Method and Description |
---|---|
String |
getDetailedErrorCode()
Returns the detailed error code that may provide more information about
the error.
|
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(String detailedErrorCode,
NamedValue[] info)
Constructs a new instance.
|
static FdkException |
getInstance(String detailedErrorCode,
Throwable cause,
NamedValue[] info)
Maps any Throwable to and FdkException, setting the error code
explicitly.
|
static FdkException |
getInstance(Throwable cause)
Maps any Throwable to an FdkException.
|
static FdkException |
getInstance(Throwable cause,
NamedValue[] info)
Maps any Throwable to an FdkException.
|
static FdkException |
getInstance(Throwable cause,
NamedValue[] info,
boolean log)
Gives control over what needs to be logged.
|
String |
getServerStackTraceId()
Returns the server stack trace ID for this exception.
|
Map |
infoMap()
Returns the options info for this error as a map.
|
void |
printLocalizedStackTrace(PrintStream stream)
Prints the stack trace of this FdkException to the specified
PrintStream.
|
void |
printStackTrace(PrintWriter pw)
Prints the stack trace of this FdkException to the specified
PrintWriter.
|
void |
setDetailedErrorCode(String errorCode)
Always throws a RuntimeException.
|
void |
setErrorCode(String errorCode)
Always throws a RuntimeException.
|
void |
setExceptionEntries(FdkExceptionEntry[] entries)
Always throws a RuntimeException.
|
void |
setInfo(NamedValue[] info)
Always throws a RuntimeException.
|
void |
setServerStackTraceId(String id)
Sets the server stack trace ID.
|
String |
toLogString(boolean includeStackTraces)
Returns a string representation of this exception.
|
String |
toLogString(boolean includeMainStackTrace,
boolean includeEntryStackTraces)
Returns a string representation of this exception.
|
String |
toString()
Returns a minimal string representation of this exception
(ERROR_CODE:DETAILED_ERROR_CODE).
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace
public FdkException()
RuntimeException
- Always.public FdkException(String detailedErrorCode, String errorCode, FdkExceptionEntry[] exceptionEntries, NamedValue[] info, String serverStackTraceId)
RuntimeException
- Always.public static FdkException getInstance(String detailedErrorCode, NamedValue[] info)
detailedErrorCode
- The detailed error code.info
- The optional info about the error. It can be
null
.public static FdkException getInstance(Throwable cause)
cause
- The Throwable that occured.public static FdkException getInstance(Throwable cause, NamedValue[] info)
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
.public static FdkException getInstance(String detailedErrorCode, Throwable cause, NamedValue[] info)
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
.public static FdkException getInstance(Throwable cause, NamedValue[] info, boolean log)
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.public String getErrorCode()
public void setErrorCode(String errorCode)
RuntimeException
- Always.public String getDetailedErrorCode()
public void setDetailedErrorCode(String errorCode)
RuntimeException
- Always.public NamedValue[] getInfo()
public void setInfo(NamedValue[] info)
RuntimeException
- Always.public Map infoMap()
public String getServerStackTraceId()
getCause()
.public void setServerStackTraceId(String id)
public FdkExceptionEntry[] getExceptionEntries()
null
.public void setExceptionEntries(FdkExceptionEntry[] entries)
RuntimeException
- Always.public String toLogString(boolean includeStackTraces)
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.public String toLogString(boolean includeMainStackTrace, boolean includeEntryStackTraces)
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.public String toString()
toLogString()
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
pw
- The PrintWriter to write to.public void printLocalizedStackTrace(PrintStream stream)
stream
- The PrintStream to write to.Copyright © 2023. All rights reserved.