Skip to content

Commit

Permalink
More verbose error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Friessn committed Oct 4, 2024
1 parent de573ae commit 93d879e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rdantic <- function(.obj, types, test = 1L) {
value <- .obj[[k]]
if (!is.null(value)) {
if (!type_check(value)) {
stop(value, " is not ", deparse(substitute(type_check)), call. = FALSE)
stop("Value of '", k , "' (\"",value, "\") failed test: ", deparse(substitute(type_check)), call. = FALSE)
}
}
}
Expand Down

0 comments on commit 93d879e

Please sign in to comment.