meh: Modal Error Handling

View source: R/meh.R

mehR Documentation

Modal Error Handling

Description

Bring up a modal dialog for application errors

Usage

meh(
  msg = getOption("DIVE.error.modal.msg"),
  error = NULL,
  footer = getOption("DIVE.error.modal.footer")
)

Arguments

msg

User-facing message that can contain HTML for formatting.

error

Forwarded error messsage to be shown depending on dev_mode option.

footer

Bottom part of the modal dialog, which by default contains nothing unless set with base::options(DIVE.error.modal.footer = ui). See details for intended uses.

Details

Module code will summon a modal dialog to display an error when execution fails, something is seriously not allowed, etc. This defaults to a generic user-facing message of "Sorry, something went wrong. Try again later or let us know about the issue.", which can be configured through base::options(DIVE.error.modal.mg = altmessage). When the dev_mode option is set, the original error will also be displayed. The footer can optionally contain a link to where the user can file issues, etc., configured with base::options(DIVE.error.modal.footer = ui).


avucoh/DIVE documentation built on Aug. 29, 2023, 6:02 p.m.