From 93d879e7fa6f2098c7bffb50c49b840115ff2e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Frie=C3=9F?= Date: Fri, 4 Oct 2024 22:59:56 +0200 Subject: [PATCH] More verbose error message --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 08c6e05..bb4ac03 100644 --- a/R/utils.R +++ b/R/utils.R @@ -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) } } }