org.jaffa.exceptions
Class ApplicationExceptionWithContext

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.jaffa.exceptions.CustomException
              extended byorg.jaffa.exceptions.ApplicationException
                  extended byorg.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

Field Summary
 
Fields inherited from class org.jaffa.exceptions.CustomException
m_arguments
 
Constructor Summary
ApplicationExceptionWithContext(String context, ApplicationException cause)
          Constructs a new ApplicationExceptionWithContext.
 
Methods inherited from class org.jaffa.exceptions.CustomException
getArguments, getLocalizedMessage, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.