@Override
  public void printStackTrace(PrintWriter writer) {
    super.printStackTrace(writer);

    if (encapsulatedException != null) {
      writer.println("*** Nested Exception:");
      encapsulatedException.printStackTrace(writer);
    }
  }
@Override
  public void printStackTrace(PrintWriter writer)