tests/testthat/test-is_try_error.R

test_that("is_try_error works", {
  x <- attempt(log("a"), silent = TRUE)
  expect_true(is_try_error(x))
  x <- attempt(log(10), silent = TRUE)
  expect_false(is_try_error(x))
})
ColinFay/trycatchthis documentation built on Aug. 26, 2024, 10:47 p.m.