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
ConstructorsConstructorDescriptionDefault 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 firstThrowablefromgetNestedThrowables()in order to conform toThrowable.getCause()in Java 1.4+.The failed object.The nested throwables.intException subtype.abstract intgetType()Exception type.booleanisFatal()Whether this error is fatal.voidStack.voidvoidThe 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, setStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getTypein interfaceExceptionInfo
-
getSubtype
public int getSubtype()Exception subtype.- Specified by:
getSubtypein interfaceExceptionInfo
-
isFatal
public boolean isFatal()Whether this error is fatal.- Specified by:
isFatalin interfaceExceptionInfo
-
setFatal
Whether this error is fatal. -
getCause
Returns the firstThrowablefromgetNestedThrowables()in order to conform toThrowable.getCause()in Java 1.4+.- Specified by:
getCausein interfaceExceptionInfo- Overrides:
getCausein classThrowable- See Also:
-
setCause
The first nested throwable. -
getNestedThrowables
The nested throwables.- Specified by:
getNestedThrowablesin interfaceExceptionInfo
-
setNestedThrowables
The nested throwables. -
getFailedObject
The failed object.- Specified by:
getFailedObjectin interfaceExceptionInfo
-
setFailedObject
The failed object. -
toString
-
printStackTrace
public void printStackTrace()Description copied from interface:ExceptionInfoStack.- Specified by:
printStackTracein interfaceExceptionInfo- Overrides:
printStackTracein classThrowable- See Also:
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-