public void printStackTrace(PrintStream ps){
  super.printStackTrace(ps);
  if (rootCause != null) {
    ps.println("With Root Cause:");
    rootCause.printStackTrace(ps);
  }
}

public void printStackTrace ( PrintStream ps ) { super . printStackTrace ( ps ) ; if ( rootCause != null ) { ps . println ( "With Root Cause:" ) ; rootCause . printStackTrace ( ps ) ; } }
prints a backtrace of this exception and the rootcause ( if any ) to a stream .
