code: public static DetailsDialog showErrorDialog (Stage stage, String text, Throwable exception) {
  		if (exception == null)
  			return showErrorDialog(stage, text, (String) null);
  		else
  			return showErrorDialog(stage, text, getStackTrace(exception));
  	}
docs: Dialog with title "Error", provided text and exception stacktrace available after pressing 'Details' button.