Skip to content
Prev 8375 / 12125 Next

[R-pkg-devel] tryCatch() doesn't capture errors due to && or || with R CMD check --as-cran

On 9/1/22 15:55, Etienne Bacher wrote:
This is because R CMD check in R 4.2.1 still used

Sys.setenv1("_R_CHECK_LENGTH_1_LOGIC2_", "abort,verbose")

with --as-cran (in check.R), so that the problematic code is found with 
highest probability.

By now in R-devel, these variables no longer have any effect (more in 
NEWS) and you always get an error, even during R CMD check --as-cran. 
Your example package passes on my build of R-devel.

Best
Tomas
Message-ID: <fe3f5d10-f6f3-d5d7-b3ea-620c81c68287@gmail.com>
In-Reply-To: <EYtAuD5vXFFQeFENJu_gUOXYiZoeRc85COpFtZDOLPWH4SgCxhZ-wR6qjssrCIAgqm3uxKSW3dSfDxqShu1_HkxROiND9PjbiuVTRQYpKQU=@protonmail.com>