Module org.eclipse.persistence.core
Class EclipseLinkException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.persistence.exceptions.EclipseLinkException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BeanValidationException,- ByteArrayException,- CommunicationException,- ConcurrencyException,- ConversionException,- CopyBookParseException,- DatabaseException,- DBWSException,- DynamicException,- EntityManagerSetupException,- JAXBException,- JPARSException,- JPQLException,- JSONException,- OptimisticLockException,- PersistenceUnitLoadingException,- RemoteCommandManagerException,- SDOException,- ServerPlatformException,- SessionLoaderException,- StaticWeaveException,- TransactionException,- ValidationException,- XMLConversionException,- XMLParseException,- XMLPlatformException
Purpose: Any exception raised by EclipseLink should be a subclass of this exception class.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Stringprotected intprotected booleanprotected Stringprotected Throwableprotected AbstractSessionprotected static Boolean
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedINTERNAL: Return a new exception.protectedEclipseLinkException(String theMessage) INTERNAL: EclipseLink exception should only be thrown by EclipseLink.protectedEclipseLinkException(String message, Throwable internalException) INTERNAL: EclipseLink exception should only be thrown by EclipseLink.
- 
Method SummaryModifier and TypeMethodDescriptionprotected static Stringcr()INTERNAL: Convenience method - return a platform-specific line-feed.intPUBLIC: Return the exception error code.INTERNAL: Used to print things nicely in the testing tool.PUBLIC: Return the internal native exception.PUBLIC: Return the exception error message.PUBLIC: Return the session.INTERNAL:booleanINTERNAL: Return if this exception has been logged to avoid being logged more than once.voidPUBLIC: Print both the normal and internal stack traces.voidprintStackTrace(PrintStream outStream) PUBLIC: Print both the normal and internal stack traces.voidprintStackTrace(PrintWriter writer) PUBLIC: Print both the normal and internal stack traces.voidsetErrorCode(int errorCode) INTERNAL:voidsetHasBeenLogged(boolean logged) INTERNAL: Set this flag to avoid logging an exception more than once.voidsetIndentationString(String indentationString) INTERNAL: Used to print things nicely in the testing tool.voidsetInternalException(Throwable exception) INTERNAL: Used to specify the internal exception.voidsetSession(AbstractSession session) INTERNAL:static voidsetShouldPrintInternalException(boolean printException) PUBLIC: Allows overriding of EclipseLink's exception chaining detection.static booleanINTERNAL Check to see if the EclipseLink-stored internal exception should be printed in this a EclipseLinkException's stack trace.toString()INTERNAL:Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
- 
Field Details- 
session
- 
internalException
- 
shouldPrintInternalException
- 
indentationString
- 
errorCodeprotected int errorCode
- 
CR
- 
hasBeenLoggedprotected boolean hasBeenLogged
 
- 
- 
Constructor Details- 
EclipseLinkExceptionprotected EclipseLinkException()INTERNAL: Return a new exception.
- 
EclipseLinkExceptionINTERNAL: EclipseLink exception should only be thrown by EclipseLink.
- 
EclipseLinkExceptionINTERNAL: EclipseLink exception should only be thrown by EclipseLink.
 
- 
- 
Method Details- 
crINTERNAL: Convenience method - return a platform-specific line-feed.
- 
getErrorCodepublic int getErrorCode()PUBLIC: Return the exception error code.
- 
getIndentationStringINTERNAL: Used to print things nicely in the testing tool.
- 
getInternalExceptionPUBLIC: Return the internal native exception. EclipseLink frequently catches Java exceptions and wraps them in its own exception classes to provide more information. The internal exception can still be accessed if required.
- 
getMessagePUBLIC: Return the exception error message. EclipseLink error messages are multi-line so that detail descriptions of the exception are given.- Overrides:
- getMessagein class- Throwable
 
- 
getSessionPUBLIC: Return the session.
- 
hasBeenLoggedpublic boolean hasBeenLogged()INTERNAL: Return if this exception has been logged to avoid being logged more than once.
- 
printStackTracepublic void printStackTrace()PUBLIC: Print both the normal and internal stack traces.- Overrides:
- printStackTracein class- Throwable
 
- 
printStackTracePUBLIC: Print both the normal and internal stack traces.- Overrides:
- printStackTracein class- Throwable
 
- 
printStackTracePUBLIC: Print both the normal and internal stack traces.- Overrides:
- printStackTracein class- Throwable
 
- 
setErrorCodepublic void setErrorCode(int errorCode) INTERNAL:
- 
setHasBeenLoggedpublic void setHasBeenLogged(boolean logged) INTERNAL: Set this flag to avoid logging an exception more than once.
- 
setIndentationStringINTERNAL: Used to print things nicely in the testing tool.
- 
setInternalExceptionINTERNAL: Used to specify the internal exception.
- 
setSessionINTERNAL:
- 
setShouldPrintInternalExceptionpublic static void setShouldPrintInternalException(boolean printException) PUBLIC: Allows overriding of EclipseLink's exception chaining detection.- Parameters:
- 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 EclipseLinkExceptions
 
- 
shouldPrintInternalExceptionpublic static boolean shouldPrintInternalException()INTERNAL Check to see if the EclipseLink-stored internal exception should be printed in this a EclipseLinkException's stack trace. This method will check the static ShouldPrintInternalException variable and if it is not set, estimate based on the JDK version used.
- 
toStringINTERNAL:
- 
getUnformattedMessageINTERNAL:
 
-