From 6caf66aed35ce3bd29a0a5c9eb36af412d33be39 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sat, 13 Jul 2024 10:23:08 -0700 Subject: [PATCH] call correct which= in sys.call() --- R/translation.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/translation.R b/R/translation.R index 42073aced..3e2a98cc6 100644 --- a/R/translation.R +++ b/R/translation.R @@ -5,7 +5,7 @@ catf = function(fmt, ..., sep=" ", domain="R-data.table") { } raise_condition = function(signal, message, classes, immediate=FALSE, appendLF=FALSE) { - obj = list(message=message, call=sys.call(2)) + obj = list(message=message, call=sys.call(sys.nframe()-2L)) # NB: append _after_ translation if (appendLF) obj$message = paste0(obj$message, "\n") setattr(obj, "class", classes)