Skip to content

Commit c08bba4

Browse files
committed
improve ... inspection message
1 parent eaf842b commit c08bba4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: wrapr
22
Type: Package
33
Title: Wrap R Tools for Debugging and Parametric Programming
44
Version: 1.9.4
5-
Date: 2020-01-11
5+
Date: 2020-01-16
66
Authors@R: c(
77
person("John", "Mount", email = "[email protected]", role = c("aut", "cre")),
88
person("Nina", "Zumel", email = "[email protected]", role = c("aut")),

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11

2-
# wrapr 1.9.4 2020-01-11
2+
# wrapr 1.9.4 2020-01-16
33

44
* tolerance on check_equiv_frames
55
* remove graphics dependency
6+
* improve ... check message.
67

78
# wrapr 1.9.3 2019-11-03
89

R/stop_if_dot_args.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ stop_if_dot_args <- function(dot_args, msg = "") {
2727
if(length(dot_args)>1) {
2828
unams <- names(dot_args)[-1]
2929
uvals <- as.character(dot_args)[-1]
30+
saw_blank <- any(nchar(uvals)<=0)
31+
uvals <- sQuote(uvals, q=FALSE)
3032
unams[is.null(unams)] <- ""
3133
not_null <- nchar(unams)>0
3234
unams[not_null] <- paste0(unams[not_null], " = ")
3335
unams[!not_null] <- ""
3436
str <- paste(paste0(unams, uvals), collapse = ", ")
37+
if(saw_blank) {
38+
str <- paste(str, "(empty arguments can be caused by having exta commas in the function call)")
39+
}
3540
stop(paste(msg, "unexpected arguments:", str),
3641
call. = FALSE)
3742
}

0 commit comments

Comments
 (0)