[Rd] Encourage exit with nonzero error status in ?last.dump

Scott Kostyshak skostysh at princeton.edu
Fri Jun 13 08:04:36 CEST 2014


The following example in ?dump.frames

options(error = quote({dump.frames(to.file = TRUE); q()}))

is useful for teaching the user how to save a frame dump when R
encounters an error during non-interactive sessions. This command
however causes an additional change that on encountering an error R
exits with a 0 error status. Although it's just an example, it's an
important one as it's referenced in the 'Details' section of the help
file. I think it would be better to encourage exiting with a nonzero
error status:

options(error = quote({dump.frames(to.file = TRUE); q(status = 1)}))

Scott


--
Scott Kostyshak
Economics PhD Candidate
Princeton University



More information about the R-devel mailing list