@Override public void printStackTrace(PrintWriter writer){
  super.printStackTrace(writer);
  if (cause != null) {
    writer.println("Caused by:");
    cause.printStackTrace(writer);
  }
}

@ Override public void printStackTrace ( PrintWriter writer ) { super . printStackTrace ( writer ) ; if ( cause != null ) { writer . println ( "Caused by:" ) ; cause . printStackTrace ( writer ) ; } }
prints this throwable and its backtrace to the specified print writer .
