[Rd] capture error messages from loading shared objects

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Nov 28 11:28:34 CET 2023


В Tue, 28 Nov 2023 10:46:45 +0100
Adrian Dusa <dusa.adrian using unibuc.ro> пишет:

> tryCatch(requireNamespace("foobar"), error = function(e) e) 

I think you meant loadNamespace() (which throws errors), not
requireNamespace() (which internally uses tryCatch(loadNamespace(...))
and may or may not print the error depending on the `quietly` argument).

-- 
Best regards,
Ivan



More information about the R-devel mailing list