Module org.glassfish.pfl.dynamic
Interface Exceptions
@ExceptionWrapper(idPrefix="OBJCOPY")
public interface Exceptions
Exception wrapper class. The logex WrapperGenerator uses this interface
to generate an implementation which returns the appropriate exception, and
generates a log report when the method is called. This is used for all
implementation classes in this package.
The exception IDs are allocated in blocks of EXCEPTIONS_PER_CLASS, which is
a lot more than is needed, but we have 32 bits for IDs, and multiples of
a suitably chosen EXCEPTIONS_PER_CLASS (like 100 here) are easy to read in
error messages.
- Author:
- ken
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Exceptions -
Method Summary
Modifier and TypeMethodDescriptioncannotCopyClass(Class<?> cls) cannotCopyInterface(Class<?> cls) couldNotCopy(Object obj, ReflectiveCopyException exc) couldNotFindClassCopier(Class<?> cls) exceptionInReadResolve(Object obj, Throwable t) voidfailureInFallback(ReflectiveCopyException exc, Object obj, Class<?> cls) noClassCopierForSuperclass(Class<?> superClass) stackOverflow(Object source, StackOverflowError ex)
-
Field Details
-
self
-
EXCEPTIONS_PER_CLASS
static final int EXCEPTIONS_PER_CLASS- See Also:
-
FB_START
static final int FB_START- See Also:
-
CCB_START
static final int CCB_START- See Also:
-
DC_START
static final int DC_START- See Also:
-
CCFPI_START
static final int CCFPI_START- See Also:
-
CCOI_START
static final int CCOI_START- See Also:
-
-
Method Details
-
failureInFallback
@Message("Object copy failed on copy of {0} which has type {1}") @Log(id=1, level=FINE) void failureInFallback(@Chain ReflectiveCopyException exc, Object obj, Class<?> cls) -
stackOverflow
@Message("Stack overflow while copying {0}") @Log(id=101, level=WARNING) ReflectiveCopyException stackOverflow(Object source, @Chain StackOverflowError ex) -
couldNotCopy
@Message("Could not copy {0}") @Log(id=201, level=WARNING) ReflectiveCopyException couldNotCopy(Object obj, ReflectiveCopyException exc) -
cannotCopyInterface
@Log(id=301, level=WARNING) @Message("Cannot copy interface (attempt was for {0})") ReflectiveCopyException cannotCopyInterface(Class<?> cls) -
couldNotFindClassCopier
@Log(id=302, level=WARNING) @Message("Could not find ClassCopier for {0}") IllegalStateException couldNotFindClassCopier(Class<?> cls) -
cannotCopyClass
@Log(id=303, level=WARNING) @Message("Could not copy class {0}") ReflectiveCopyException cannotCopyClass(Class<?> cls) -
exceptionInReadResolve
@Message("Exception in readResolve() for {0}") @Log(id=401, level=WARNING) RuntimeException exceptionInReadResolve(Object obj, @Chain Throwable t) -
noClassCopierForSuperclass
@Message("Cannot create ClassFieldCopier for superclass {0} : This class already has a ClassCopier") @Log(id=401, level=WARNING) ReflectiveCopyException noClassCopierForSuperclass(Class<?> superClass)
-