|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.eclipse.persistence.exceptions.EclipseLinkException
public abstract class EclipseLinkException
Purpose: Any exception raised by EclipseLink should be a subclass of this exception class.
Field Summary | |
---|---|
protected static java.lang.String |
CR
|
protected int |
errorCode
|
protected boolean |
hasBeenLogged
|
protected java.lang.String |
indentationString
|
protected java.lang.Throwable |
internalException
|
protected org.eclipse.persistence.internal.sessions.AbstractSession |
session
|
protected static java.lang.Boolean |
shouldPrintInternalException
|
Constructor Summary | |
---|---|
EclipseLinkException()
INTERNAL: Return a new exception. |
|
EclipseLinkException(java.lang.String theMessage)
INTERNAL: EclipseLink exception should only be thrown by EclipseLink. |
|
EclipseLinkException(java.lang.String message,
java.lang.Throwable internalException)
INTERNAL: EclipseLink exception should only be thrown by EclipseLink. |
Method Summary | |
---|---|
protected static java.lang.String |
cr()
INTERNAL: Convenience method - return a platform-specific line-feed. |
int |
getErrorCode()
PUBLIC: Return the exception error code. |
java.lang.String |
getIndentationString()
INTERNAL: Used to print things nicely in the testing tool. |
java.lang.Throwable |
getInternalException()
PUBLIC: Return the internal native exception. |
java.lang.String |
getMessage()
PUBLIC: Return the exception error message. |
org.eclipse.persistence.internal.sessions.AbstractSession |
getSession()
PUBLIC: Return the session. |
boolean |
hasBeenLogged()
INTERNAL: Return if this exception has been logged to avoid being logged more than once. |
void |
printStackTrace()
PUBLIC: Print both the normal and internal stack traces. |
void |
printStackTrace(java.io.PrintStream outStream)
PUBLIC: Print both the normal and internal stack traces. |
void |
printStackTrace(java.io.PrintWriter writer)
PUBLIC: Print both the normal and internal stack traces. |
void |
setErrorCode(int errorCode)
INTERNAL: |
void |
setHasBeenLogged(boolean logged)
INTERNAL: Set this flag to avoid logging an exception more than once. |
void |
setIndentationString(java.lang.String indentationString)
INTERNAL: Used to print things nicely in the testing tool. |
void |
setInternalException(java.lang.Throwable exception)
INTERNAL: Used to specify the internal exception. |
void |
setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: |
static void |
setShouldPrintInternalException(boolean printException)
PUBLIC: Allows overriding of EclipseLink's exception chaining detection. |
static boolean |
shouldPrintInternalException()
INTERNAL Check to see if the EclipseLink-stored internal exception should be printed in this a EclipseLinkException's stack trace. |
java.lang.String |
toString()
INTERNAL: |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient org.eclipse.persistence.internal.sessions.AbstractSession session
protected java.lang.Throwable internalException
protected static java.lang.Boolean shouldPrintInternalException
protected java.lang.String indentationString
protected int errorCode
protected static final java.lang.String CR
protected boolean hasBeenLogged
Constructor Detail |
---|
public EclipseLinkException()
public EclipseLinkException(java.lang.String theMessage)
public EclipseLinkException(java.lang.String message, java.lang.Throwable internalException)
Method Detail |
---|
protected static java.lang.String cr()
public int getErrorCode()
public java.lang.String getIndentationString()
public java.lang.Throwable getInternalException()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
public boolean hasBeenLogged()
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream outStream)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
public void setErrorCode(int errorCode)
public void setHasBeenLogged(boolean logged)
public void setIndentationString(java.lang.String indentationString)
public void setInternalException(java.lang.Throwable exception)
public void setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
public static void setShouldPrintInternalException(boolean printException)
booleam
- printException - If printException is true, the EclipseLink-stored
Internal exception will be included in a stack trace or in the exception message of a EclipseLinkException.
If printException is false, the EclipseLink-stored Internal Exception will not be included
in the stack trace or the exception message of EclipseLinkExceptionspublic static boolean shouldPrintInternalException()
public java.lang.String toString()
toString
in class java.lang.Throwable
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |