[R] Stopping all code execution when ANY error occurs (OR error handling without try/tryCatch)

William Dunlap wdunlap at tibco.com
Mon Aug 13 19:24:39 CEST 2012


In RStudio use
    File > New > R Script
to make a script window (and file) and run it using
    Code > Source
(or Control-Shift-S).  The script will stop at the first error.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf
> Of enocko
> Sent: Saturday, August 11, 2012 6:57 PM
> To: r-help at r-project.org
> Subject: Re: [R] Stopping all code execution when ANY error occurs (OR error handling
> without try/tryCatch)
> 
> Hi, thanks for the ideas, folks.
> 
> I'm on Windows 7, R 2.15.0 x64, RStudio 0.97.71.
> 
> I do appreciate your time... I would like to say my goal of dealing with
> errors without R's error trapping tools is not nonsensical given that those
> tools are cumbersome and not well-suited to the development phase of coding
> where one informally runs various snippets all the time.
> 
> The suggestion of looking at IDE's is a good one because it would not be
> hard for an IDE to just wait and see if any line of code gives an error, and
> halt execution if so (a global option could enable this). RStudio doesn't
> have this--does anyone know of something that does? I can post a suggestion
> to RStudio.
> 
> Thanks,
> 
> Phil
> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Stopping-all-code-
> execution-when-ANY-error-occurs-OR-error-handling-without-try-tryCatch-
> tp4640023p4640073.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list