It uses silent = TRUE to not emit the error if thrown by the call wrapped in try(), and
It uses inherits() to test for the "try-error" class instead of matching equality between class(x) and string "try-error". This latter usage now results in a NOTE under ´R CMD check´.
This PR does two things, cherry-picking from #14.
silent = TRUE
to not emit the error if thrown by the call wrapped intry()
, andinherits()
to test for the"try-error"
class instead of matching equality betweenclass(x)
and string"try-error"
. This latter usage now results in a NOTE under ´R CMD check´.