document (version 3.0.1)

throw: Throw an Error

Description

Throws a condition of class c("document", "error", "condition").

Usage

throw(message_string, system_call = sys.call(-1), ...)

Arguments

message_string

The message to be thrown.

system_call

The call to be thrown.

...

Arguments to be passed to structure.

Value

FALSE. But it does not return anything, it stops with a condition of class c("document", "error", "condition").

Details

We use this condition as an error dedicated to document.

Examples

Run this code
# NOT RUN {
tryCatch(document:::throw("Hello error!"), error = function(e) return(e))
# }

Run the code above in your browser using DataCamp Workspace