public static @NlsSafe String getTextFromThrowable(Throwable t) {
    String message = t.getMessage();
    if (StringUtil.isEmptyOrSpaces(message)) {
      message = t.getClass().getName();
    }

    StringWriter writer = new StringWriter();
    t.printStackTrace(new PrintWriter(writer));

    return "Error: " + message + '\n' + writer.getBuffer();
  }
public static @NlsSafe String getTextFromThrowable(Throwable t)