Re: [Rd] Resume processing after warning handler.

2012-02-06 Thread Martin Morgan
On 02/06/2012 04:46 AM, Titus von der Malsburg wrote: On Sat, Feb 4, 2012 at 4:37 PM, Martin Morgan wrote: On 02/03/2012 02:49 AM, Titus von der Malsburg wrote: Hi Titus -- use withCallingHandlers to capture the warning, and invokeRestart() to continue after handling it. withCallingHandlers({

Re: [Rd] Resume processing after warning handler.

2012-02-06 Thread Titus von der Malsburg
On Sat, Feb 4, 2012 at 4:37 PM, Martin Morgan wrote: > On 02/03/2012 02:49 AM, Titus von der Malsburg wrote: > Hi Titus -- use withCallingHandlers to capture the warning, and > invokeRestart() to continue after handling it. > > withCallingHandlers({ >    warning('oops') >    message('continuing')

Re: [Rd] Resume processing after warning handler.

2012-02-04 Thread Martin Morgan
On 02/03/2012 02:49 AM, Titus von der Malsburg wrote: Dear list! I have a script that processes a large number of data files. When one file fails to process correctly, I want the script to write a message and to continue with the next file. I achieved this with tryCatch: for (f in files)

[Rd] Resume processing after warning handler.

2012-02-04 Thread Titus von der Malsburg
Dear list! I have a script that processes a large number of data files. When one file fails to process correctly, I want the script to write a message and to continue with the next file. I achieved this with tryCatch: for (f in files) tryCatch({heavy.lifting(f)}, error=function(e) log.err