R/stop_if_dot_args.R
stop_if_dot_args.Rd
Generate a stop with a good error message if the dots argument was a non-trivial list. Useful in writing functions that force named arguments.
stop_if_dot_args(dot_args, msg = "")
dot_args | substitute(list(...)) from another function. |
---|---|
msg | character, optional message to prepend. |
NULL or stop()
#> [1] 8f(7, inc = 2)#> [1] 9#> <simpleError: f unexpected arguments: ‘2’>