protected static void printExceptionStack(Throwable th,PrintWriter out,int depth){
  boolean printStackDepth=depth > 0;
  Throwable wrappedException=ExceptionUtil.wrappedException(th);
  if (wrappedException != null) {
    printStackDepth=true;
    printExceptionStack(wrappedException,out,depth + 1);
  }
  if (printStackDepth) {
    out.write("[" + depth + "]");
  }
  th.printStackTrace(out);
}

protected static void printExceptionStack ( Throwable th , PrintWriter out , int depth ) { boolean printStackDepth = depth > 0 ; Throwable wrappedException = ExceptionUtil . wrappedException ( th ) ; if ( wrappedException != null ) { printStackDepth = true ; printExceptionStack ( wrappedException , out , depth + 1 ) ; } if ( printStackDepth ) { out . write ( "[" + depth + "]" ) ; } th . printStackTrace ( out ) ; }
recursively prints out a stack of wrapped exceptions .
