As Tomas pointed out, it may be helpful to read the R documentation. The error
option expects a function, so I suppose you intended something like
options(error=function() {recover(); q(status=1)})
which corresponds to calling dump.frames()
Cheers,
Simon
> On Mar 17, 2019, at 23:44, comic fans
Thanks for explanation, so recover in non-interactive session exit
with 0 is expected behavior .
dump.frames said that it always write to file (workspace , or specified file).
I have a R script run as a auto build stage, so I want to print detail
backtrace to console
(with source file, line numbe
Please refer to the documentation (?stop, ?recover, ?dump.frames). In
non-interactive use, recover() works as dump.frames(). dump.frames() is
documented not to quit R, and the examples show how to quit the R
session with a given status automatically after dump.frames(). So in
line with the d
Hello, I've noticed that Rscript didn't exit with error code if I set
options error = utils::recover in .Rprofile . for example
Rscript -e "asdf"
Error: object 'asdf' not found
No suitable frames for recover()
echo $?
0
if didn't set options in .Rprofile, Rscript exit with error code 1, is
this