code: public void printStackTrace(java.io.PrintWriter pw) {
          String lineSep = getLineSeparatorProperty();
  
          printText(pw, "currentException", "Current exception:");
          printStackTrace(lineSep, pw);
          printText(pw, "endOfExTraces", "End of exception traces");
      }
docs: Print the stack trace to a print writer.
  </p>
  If this exception was thrown from a remote process,
  the stack trace will include the stack from the
  remote process.
  
  @param param java.io.PrintWriter