code: public static void traceException(TraceComponent callersTrace, Throwable ex)
     {
       if (light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) {
  
         // Find XA completion code if one exists, as this isn't in a normal dump
         String xaErrStr = null;
         if (ex instanceof XAException) {
           XAException xaex = (XAException)ex; 
           xaErrStr = "XAExceptionErrorCode: " + xaex.errorCode;
         }
  
         // Trace using the correct trace group
         if (light_tc.isDebugEnabled()) {
           if (xaErrStr != null) SibTr.debug(light_tc, xaErrStr);
           SibTr.exception(light_tc, ex);
         }
         else {
           if (xaErrStr != null) SibTr.debug(callersTrace, xaErrStr);
           SibTr.exception(callersTrace, ex);
         }
       }
     }
docs: Trace an exception.
  @param callersTrace The trace component of the caller
  @param ex The exception