question: public void addExceptionContext ( ExceptionContext exceptionContext ) { ExceptionMessage mostRecent ; mostRecent = m_exceptionMessages . lastElement ( ) ; if ( null != mostRecent ) { mostRecent . addExceptionContext ( exceptionContext ) ; } else { m_exceptionContexts . addElement ( exceptionContext ) ; } if ( null != m_nestedException ) { Enumeration < ? > enumeration ; enumeration = m_nestedException . getAllExceptionMessages ( ) ; ExceptionMessage exceptionMessage ; while ( enumeration . hasMoreElements ( ) ) { exceptionMessage = ( ExceptionMessage ) enumeration . nextElement ( ) ; exceptionMessage . addExceptionContext ( exceptionContext ) ; } } }
target:  Add context to exception messages within this exception. The context is effectively a named parameter used within the messages. <p> The rules: <p> 1. If this exception contains messages the context will be applied only to the most recent message. 2. If this exception contains no messages the context will be applied to the next exception message that is added if one is ever added. 3. Regardless of the outcome of (1) and (2) above, the context will be applied to ALL messages contained within any child exceptions (exceptions nested within this exception).