code: public static Optional<ButtonType> showException(String title, String header, Exception e) {
          Alert alert = getAlert(title, header, "错误信息追踪：", AlertType.ERROR);
  
          StringWriter stringWriter = new StringWriter();
          PrintWriter printWriter = new PrintWriter(stringWriter);
          e.printStackTrace(printWriter);
          String exception = stringWriter.toString();
  
          TextArea textArea = new TextArea(exception);
          textArea.setEditable(false);
          textArea.setWrapText(true);
  
          textArea.setMaxWidth(Double.MAX_VALUE);
          textArea.setMaxHeight(Double.MAX_VALUE);
          GridPane.setVgrow(textArea, Priority.ALWAYS);
          GridPane.setHgrow(textArea, Priority.ALWAYS);
  
          GridPane gridPane = new GridPane();
          gridPane.setMaxWidth(Double.MAX_VALUE);
          gridPane.add(textArea, 0, 0);
  
          alert.getDialogPane().setExpandableContent(gridPane);
  
          return alert.showAndWait();
      }
docs: 弹出异常框
  
  @param title 标题
  @param header 信息头
  @param e 异常
  
  @return {@link ButtonType}