Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.exceptions
Class TopLinkException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.toplink.exceptions.TopLinkException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CacheSynchCommunicationException, CacheSynchronizationException, CommunicationException, ConcurrencyException, ConversionException, DatabaseException, DefaultMappingException, EJBJarXMLException, EJBQLException, EntityManagerSetupException, JAXBException, JMSProcessingException, JPQLException, MigrationUtilityException, OptimisticLockException, PersistenceUnitLoadingException, RemoteCommandManagerException, SDOException, SessionLoaderException, StaticWeaveException, SynchronizationException, TransactionException, ValidationException, XMLConversionException, XMLParseException, XMLPlatformException

public abstract class TopLinkException
extends java.lang.RuntimeException

Purpose: Any exception raised by TopLink should be a subclass of this exception class.

See Also:
Serialized Form

Method Summary
 int getErrorCode()
          Return the exception error code.
 java.lang.Throwable getInternalException()
          Return the internal native exception.
 java.lang.String getMessage()
          Return the exception error message.
 oracle.toplink.internal.sessions.AbstractSession getSession()
          Return the session.
 void printStackTrace()
          Print both the normal and internal stack traces.
 void printStackTrace(java.io.PrintStream outStream)
          Print both the normal and internal stack traces.
 void printStackTrace(java.io.PrintWriter writer)
          Print both the normal and internal stack traces.
static void setShouldPrintInternalException(boolean printException)
          Allows overiding of TopLink's exception chaining detection.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getErrorCode

public int getErrorCode()
Return the exception error code.


getInternalException

public java.lang.Throwable getInternalException()
Return the internal native exception. TopLink 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.


getMessage

public java.lang.String getMessage()
Return the exception error message. TopLink error messages are multi-line so that detail descriptions of the exception are given.

Overrides:
getMessage in class java.lang.Throwable

getSession

public oracle.toplink.internal.sessions.AbstractSession getSession()
Return the session.


printStackTrace

public void printStackTrace()
Print both the normal and internal stack traces.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream outStream)
Print both the normal and internal stack traces.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Print both the normal and internal stack traces.

Overrides:
printStackTrace in class java.lang.Throwable

setShouldPrintInternalException

public static void setShouldPrintInternalException(boolean printException)
Allows overiding of TopLink's exception chaining detection.

Parameters:
booleam - printException - If printException is true, the TopLink-stored Internal exception will be included in a stack traceor in the exception message of a TopLinkException. If printException is false, the TopLink-stored Internal Exception will not be included in the stack trace or the exception message of TopLinkExceptions

Copyright © 1998, 2012, Oracle. All Rights Reserved.