question: public void printStackTrace ( java . io . PrintWriter pw ) { if ( rootCause != null ) { String superString = super . toString ( ) ; synchronized ( pw ) { pw . print ( superString + ( superString . endsWith ( "." ) ? "" : "." ) + "  Root exception is " ) ; rootCause . printStackTrace ( pw ) ; } } else { super . printStackTrace ( pw ) ; } }
target:  Prints this exception's stack trace to a print writer. If this exception has a root exception; the stack trace of the root exception is printed to the print writer instead.