throw: throw a condition

Description Usage Arguments Details Value Examples

View source: R/internals.R View source: R/throw.R

Description

throws a condition of class c("cleanr", "error", "condition").

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

Usage

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

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 base::structure.

Details

We use this condition as an error dedicated to cleanr.

We use this condition as an error dedicated to cleanr.

Value

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

The function does never return anything, it stops with a condition of class c("error", "cleanr", "condition").

Examples

1
2
tryCatch(cleanr:::throw("Hello error!"), cleanr = function(e) return(e))
tryCatch(cleanr:::throw("Hello error!"), cleanr = function(e) return(e))

cleanr documentation built on Nov. 14, 2021, 9:07 a.m.