From khansen at stat.berkeley.edu  Thu Jul 16 07:02:19 2009
From: khansen at stat.berkeley.edu (Kasper Daniel Hansen)
Date: Wed, 15 Jul 2009 22:02:19 -0700
Subject: [Rd] question about try and errors
Message-ID: <22F9A100-AB6E-42D8-AE0C-FC583F837FA3@stat.berkeley.edu>

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



[Rd] question about try and errors
Kasper Daniel Hansen