Skip to content
2 changes: 1 addition & 1 deletion R/qenv-get_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ setMethod("get_code", signature = "qenv.error", function(object, ...) {
sprintf(
"%s\n\ntrace: \n %s\n",
conditionMessage(object),
paste(lang2calls(object$trace), collapse = "\n ")
Comment thread
pawelru marked this conversation as resolved.
paste(object$trace, collapse = "\n ")
),
class = c("validation", "try-error", "simpleError")
)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-qenv_get_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ testthat::test_that("get_code called with qenv.error returns error with trace in
testthat::expect_equal(class(code), c("validation", "try-error", "simpleError", "error", "condition"))
testthat::expect_equal(
code$message,
"object 'v' not found \n when evaluating qenv code:\nw <- v\n\ntrace: \n c(\"x <- 1\", \"y <- x\", \"w <- v\")\n"
"object 'v' not found \n when evaluating qenv code:\nw <- v\n\ntrace: \n x <- 1\n y <- x\n w <- v\n"
)
})