I am using try. I have found that sometimes errors are not caught by try. For example, I got the following error message from code that was wrapped in try. After the error, my R CMD BATCH aborted.

Error in assign(".target", met...@target, envir = envir) :
  no function to return from, jumping to top level
Calls: reverseComplement -> loadMethod -> loadMethod -> assign
Execution halted

This specific error is in relation to the emails posted by Herve about problems with the methods package (I think), and it also happens inside a large piece of code that takes several hours to execute. So it is not easy to give a reproducible example.

I am however surprised by the fact that try does not catch all errors - are there different error levels in R?

Kasper

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to