public final WorkbenchDialog showErrorDialog(String title,
                                                 String message,
                                                 Exception exception,
                                                 Consumer<ButtonType> onResult) {
        WorkbenchDialog dialog = WorkbenchDialog.builder(title, message, Type.ERROR)
                .exception(exception)
                .onResult(onResult)
                .build();
        return showDialog(dialog);
    }
Shows an error dialog in the view with a stacktrace of the {@code exception}.

@param title     of the dialog
@param message   of the dialog
@param exception of which the stacktrace should be shown
@param onResult  the action to perform when a button of the dialog was pressed, providing the
                 {@link ButtonType} that was pressed
@return the {@link WorkbenchDialog}, which will be shown
@implNote If the user closes a non-blocking dialog by clicking on the {@link GlassPane}, the
result will be {@link ButtonType#CANCEL}.
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/Workbench.java