Create a custom error condition created with
rlang::abort()
with a - hopefully - more useful
error message and metadata.
abort_argument_type(arg, must, not)abort_argument_class(arg, must, not)
abort_argument_length(arg, must, not)
abort_argument_diff_length(arg1, arg2)
abort_argument_value(arg, valid_values)
Each function returns a classed error condition.
abort_argument_type()
returns a error_argument_type
class,
abort_argument_length()
returns a error_argument_length
class, abort_argument_diff_length()
returns a
error_argument_diff_length
class and abort_argument_value()
returns a error_argument_value
class.
A character string with the argument name.
A character string specifying a condition the argument must fulfill.
Either a character string specifying a condition the argument
must not fulfill or the bare (unquoted) argument name. In the last case,
the function evaluates the argument type (abort_argument_type()
) or
length (abort_argument_length()
) and displays the result in the
error message.
A character string with the argument name.
A character vector with the valid values.
abort_column_not_found()
,
abort_no_method_for_class()