Skip to content
Prev 20726 / 63421 Next

delayedAssign and interrupts

On 5/19/2006 10:37 AM, Luke Tierney wrote:
Right, but the user would have seen the error, and can decide how to 
recover from it.  If trying to evaluate x again is the wrong thing to 
do, the user is the one who would know that.
This is a very rare situation, so I agree putting in some slow way to 
recover from an error is a bad idea.  I think we should do the following:

  - fix substitute so it could be used to extract the promise expression 
even if x lives in .GlobalEnv.  (This can't happen for 2.3.1.)

  - add delayedAssignmentReset to repair x if that's preferred.  (Is 
this a reasonable addition to a patch release?)

This won't leave promises alone in case of an error, but will make it 
fairly easy for a user to recover using tryCatch.

Duncan