[Rd] Determining the exit code of an "almost finished" R script

Gergely Daróczi d@rocz|g @end|ng |rom r@pporter@net
Sat Jun 8 13:42:01 CEST 2019

Dear All,

I'm using "reg.finalizer" in a function that is to be called in R scripts
to do some cleanup on success. I have not found a way to run the function
only if the script run without errors, so when the exit code is expected to
be 0.

What I've tried is checking "geterrmessage()", but unfortunately it's not
perfect: if an error was handled with eg "tryCatch" previously, that
message still shows up there.

Is there any better way of figuring out in "reg.finalizer" or ".Last" if
the session run OK or exiting with !0 exit code?


	[[alternative HTML version deleted]]

More information about the R-devel mailing list