Description Active bindings Methods
Core class to create and handle issues.
rule
Rules to perform checks, must be functions that accept a single argument and return a boolean.
message
The message (warning or error).
call
Expression or function (as string) that led to the issue.
raiser
Function to run when the raise
method
is called. By default the error uses stop()
and warning
uses warning()
. The function must accept a single argument:
the error message (character vector).
new()
Issue$new(obj, type = c("error", "warning"))
obj
A character string or an object of
class error
, or warning
.
type
Type of message.
Initialise
print()
Issue$print()
Print message of error or warning.
return()
Issue$return(n = 1)
n
the number of generations to go back, passed to
parent.frame()
.
Return Returns self from parent function.
addRule()
Issue$addRule(fn)
fn
Function defining rule, must accept a single argument and return a boolean.
Add a rule
check()
Issue$check(obj)
obj
Object to check by rules
Add a predicate
raise()
Issue$raise(fn = NULL)
fn
A function to use to raise the issue.
Raise error or warning
clone()
The objects of this class are cloneable with this method.
Issue$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.