H
ow about a custom error handling function? As in,

options(error = quote( ...CODE TO SEND EMAIL ... ))


On Wed, Jul 24, 2013 at 4:06 PM, brt <brt...@mail.usask.ca> wrote:

> I have a web service that uses an R script to perform the analysis.  At the
> end of the R script, I use the system function to call an external (perl)
> script that sends the user an e-mail telling them that their analysis has
> finished running, and where they can download the results.  However, if the
> R script crashes (say...
>
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
>   line 5 did not have 42 elements
> Calls: as.matrix -> read.table -> scan
> Execution halted
>
> ), I want the R script to call an external script that will e-mail the user
> telling them that an error has occurred. I do not want to use try-catch
> blocks because I want this to happen no matter what/where the error, and
> because the script is large and it would be unwieldy to try to catch
> specific things. Is this possible, and if so, how?
>
> Thank you very much in advance for any help!
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Perform-task-on-error-tp4672258.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to