cpp11
cpp11 copied to clipboard
Catch error from R function
trafficstars
Is it possible to evaluate an R function and in case of an error catch the error condition and modify it?
For example I want to evaluate log() on x but x is the character "a"
auto log = cpp11::package("base")["log"];
log(x);
Can I catch the error with cpp11 and modify it or pass it to another R function?