Signal a condition objectSource:
cnd_signal() takes a condition as argument and emits the
corresponding signal. The type of signal depends on the class of
An interrupt is signalled if the condition inherits from
"interrupt". This is equivalent to signalling with
A condition object (see
cnd_signal()returns without signalling a condition.
These dots are for future extensions and must be empty.
# The type of signal depends on the class. If the condition # inherits from "warning", a warning is issued: cnd <- warning_cnd("my_warning_class", message = "This is a warning") cnd_signal(cnd) #> Warning: This is a warning # If it inherits from "error", an error is raised: cnd <- error_cnd("my_error_class", message = "This is an error") try(cnd_signal(cnd)) #> Error : This is an error