code: static void printStackTrace(NlsThrowable throwable, Locale locale, Appendable buffer) {
  
      try {
        synchronized (buffer) {
          buffer.append(throwable.getClass().getName());
          buffer.append(": ");
          throwable.getLocalizedMessage(locale, buffer);
          buffer.append('\n');
          UUID uuid = throwable.getUuid();
          if (uuid != null) {
            buffer.append(uuid.toString());
            buffer.append('\n');
          }
          StackTraceElement[] trace = throwable.getStackTrace();
          for (int i = 0; i < trace.length; i++) {
            buffer.append("\tat ");
            buffer.append(trace[i].toString());
            buffer.append('\n');
          }
          for (Throwable suppressed : ((Throwable) throwable).getSuppressed()) {
            buffer.append("Suppressed: ");
            buffer.append('\n');
            printStackTraceCause(suppressed, locale, buffer);
          }
  
          Throwable cause = throwable.getCause();
          if (cause != null) {
            buffer.append("Caused by: ");
            buffer.append('\n');
            printStackTraceCause(cause, locale, buffer);
          }
        }
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
docs: @see NlsThrowable#printStackTrace(Locale, Appendable)
  
  @param throwable is the {@link NlsThrowable} to print.
  @param locale is the {@link Locale} to translate to.
  @param buffer is where to write the stack trace to.