fatal_error | R Documentation |
fatal_error()
is equivalent to the base function base::stop()
,
except it is intended to signal critical errors where recovery
is impossible or unfeasible.
Fatal errors are signaled via rlang::abort()
with the class
precondition/fatal_error
. The option fatal_error_action
controls
the behavior of the fatal errors.
option(fatal_error_action = "inform")
will display a
warning if a fatal error has been prevented from bubbling up to the #
user(either via 'tryCatch() or some other error handling mechanism). This
is the default setting and will draw user's attention to a fatal error
occurring.
option(fatal_error_action = "none")
will make fatal errors
behave like regular R error conditions. Use this if your code contains custom
logic for handling fatal errors.
option(fatal_error_action = 'terminate')
will immediately
the program execution without saving the workspace or running finalizers
when a fatal error occurs.
fatal_error(bullets, ...)
bullets |
a character vector containing the error message,
can be formatted in the style of |
... |
reserved for future use |
fatal_error()
is used in sanity_check()
to report critical assertion failures.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.