code: public void crashAlert(Stage stage, String crashMessage) {
          messageLabel.setText("Unfortunately, we screwed up and the app crashed. Sorry about that!");
          detailsLabel.setText(crashMessage);
  
          cancelButton.setVisible(false);
          actionButton.setVisible(false);
          okButton.setOnAction(actionEvent -> stage.close());
      }
docs: Initialize this alert dialog for information about a crash.