public void printStackTrace(java.io.PrintStream ps){
  if (rootCause != null) {
    String superString=super.toString();
synchronized (ps) {
      ps.print(superString + (superString.endsWith(".") ? "" : ".") + "  Root exception is ");
      rootCause.printStackTrace(ps);
    }
  }
 else {
    super.printStackTrace(ps);
  }
}

public void printStackTrace ( java . io . PrintStream ps ) { if ( rootCause != null ) { String superString = super . toString ( ) ; synchronized ( ps ) { ps . print ( superString + ( superString . endsWith ( "." ) ? "" : "." ) + "  Root exception is " ) ; rootCause . printStackTrace ( ps ) ; } } else { super . printStackTrace ( ps ) ; } }
prints this exception ' s stack trace to a print stream . if this exception has a root exception , the stack trace of the root exception is printed to the print stream instead .
