Package org.apache.openjpa.util
Class OpenJPAException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.openjpa.util.OpenJPAException
- All Implemented Interfaces:
Serializable
,ExceptionInfo
- Direct Known Subclasses:
GeneralException
,InternalException
,StoreException
,UnsupportedException
,UserException
,ValidationUnavailableException
,WrappedException
public abstract class OpenJPAException
extends RuntimeException
implements Serializable, ExceptionInfo
Exception type for all OpenJPA exceptions. Meant to be easily
transformed into an appropriate exception at the API layer, since most APIs
define their own exception types.
- Since:
- 0.4.0
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from interface org.apache.openjpa.util.ExceptionInfo
GENERAL, INTERNAL, STORE, UNAVAILABLE, UNSUPPORTED, USER, WRAPPED
-
Constructor Summary
ConstructorDescriptionDefault constructor.OpenJPAException
(String msg) Constructor; supply message.OpenJPAException
(String msg, Throwable cause) Construct with message and cause.OpenJPAException
(Throwable cause) Construct with cause.Constructor; supply message.OpenJPAException
(Localizer.Message msg, Throwable cause) Construct with message and cause. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Returns the firstThrowable
fromgetNestedThrowables()
in order to conform toThrowable.getCause()
in Java 1.4+.The failed object.The nested throwables.int
Exception subtype.abstract int
getType()
Exception type.boolean
isFatal()
Whether this error is fatal.void
Stack.void
void
The first nested throwable.setFailedObject
(Object failed) The failed object.setFatal
(boolean fatal) Whether this error is fatal.setNestedThrowables
(Throwable[] nested) The nested throwables.toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.openjpa.util.ExceptionInfo
getMessage
-
Constructor Details
-
OpenJPAException
public OpenJPAException()Default constructor. -
OpenJPAException
Constructor; supply message. -
OpenJPAException
Constructor; supply message. -
OpenJPAException
Construct with cause. -
OpenJPAException
Construct with message and cause. -
OpenJPAException
Construct with message and cause.
-
-
Method Details
-
getType
public abstract int getType()Exception type.- Specified by:
getType
in interfaceExceptionInfo
-
getSubtype
public int getSubtype()Exception subtype.- Specified by:
getSubtype
in interfaceExceptionInfo
-
isFatal
public boolean isFatal()Whether this error is fatal.- Specified by:
isFatal
in interfaceExceptionInfo
-
setFatal
Whether this error is fatal. -
getCause
Returns the firstThrowable
fromgetNestedThrowables()
in order to conform toThrowable.getCause()
in Java 1.4+.- Specified by:
getCause
in interfaceExceptionInfo
- Overrides:
getCause
in classThrowable
- See Also:
-
setCause
The first nested throwable. -
getNestedThrowables
The nested throwables.- Specified by:
getNestedThrowables
in interfaceExceptionInfo
-
setNestedThrowables
The nested throwables. -
getFailedObject
The failed object.- Specified by:
getFailedObject
in interfaceExceptionInfo
-
setFailedObject
The failed object. -
toString
-
printStackTrace
public void printStackTrace()Description copied from interface:ExceptionInfo
Stack.- Specified by:
printStackTrace
in interfaceExceptionInfo
- Overrides:
printStackTrace
in classThrowable
- See Also:
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-