Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdmit custom condition for input validation errors #25
Comments
|
And update `%secure%` <- function(args, f) {
nms <- names(args) %||% character(length(args))
firmly(
f,
.checklist = args[!nms %in% c(".warn_missing", ".error_class")],
.warn_missing = args[[".warn_missing"]] %||% character(),
.error_class = args[[".error_class"]] %||% character()
)
}(No need for |
If an input validation error occurs,
firmlysignals asimpleError. For more discriminating error handling downstream,firmlyshould be allowed to signal other classes of errors. In other words,firmlyshould have a character-vector parameter.error_classthat gives the subclass of the condition, inheriting fromc("error", "condition")(default value"simpleError"), that is to be signaled by an input validation error.New signature should be