Consider the following usage:
tryCatch(log(\"a\"), error = function(e) NULL)
#NULL
Now I\'m trying to do essentially the same, but in a more co
I'm going to suggest closing as off-topic because this is an RStudio problem. Basically, tryCatch
is catching the error, but RStudio's error handler prints the error anyway. Thus the reason you're getting a return value:
[[1]]
NULL
[[2]]
NULL
This means tryCatch
works. RStudio just prints caught errors weirdly.