Learn R Programming

cleanr (version 1.1.3)

throw: throw a condition

Description

throws a condition of class c("cleanr", "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("cleanr", "error", "condition").

Details

We use this condition as an error dedicated to cleanr.

Examples

Run this code
tryCatch(cleanr:::throw("Hello error!"), cleanr = function(e) return(e))

Run the code above in your browser using DataLab