[Rd] question about try and errors

Kasper Daniel Hansen khansen at stat.berkeley.edu
Thu Jul 16 07:02:19 CEST 2009


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", method at 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



More information about the R-devel mailing list