[Rd] Determining the exit code of an "almost finished" R script
d@rocz|g @end|ng |rom r@pporter@net
Sat Jun 8 13:42:01 CEST 2019
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
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