org.jaffa.exceptions
Class ApplicationExceptionWithContext
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jaffa.exceptions.CustomException
org.jaffa.exceptions.ApplicationException
org.jaffa.exceptions.ApplicationExceptionWithContext
- All Implemented Interfaces:
- Serializable
- public class ApplicationExceptionWithContext
- extends ApplicationException
An application can use this class to wrap an ApplicationException and add a context to it.
This is useful when processing collections of data. The context can be used to pinpoint the data-set which encountered errors.
It is recommended to use the dot-notation for the context.
For eg: If we were processing a User graph, then the context can be of the types:
users.0 (The source exception was raised while processing the 1st user record)
users.1.userroles.2 (The source exception was raised while processing the 3rd userrole of the 2nd user record)
- See Also:
- Serialized Form
ApplicationExceptionWithContext
public ApplicationExceptionWithContext(String context,
ApplicationException cause)
- Constructs a new ApplicationExceptionWithContext.
- Parameters:
context - the context under which the cause exception was raised. A null value is not permitted.cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). A null value is not permitted.
Copyright © 2002-2004 JAFFA Project.