Re: [Rd] tryCatch in on.exit()

2017-12-06 Thread luke-tierney
This should now be resolved in R-devel and R_patched. Best, luke On Fri, 1 Dec 2017, luke-tier...@uiowa.edu wrote: Thanks -- will look into it. luke On Fri, 1 Dec 2017, William Dunlap via R-devel wrote: The following example involves a function whose on.exit() expression both generates

Re: [Rd] tryCatch in on.exit()

2017-12-01 Thread luke-tierney
Thanks -- will look into it. luke On Fri, 1 Dec 2017, William Dunlap via R-devel wrote: The following example involves a function whose on.exit() expression both generates an error and catches the error. The body of the function also generates an error. When calling the function wrapped in a

Re: [Rd] tryCatch in on.exit()

2017-12-01 Thread William Dunlap via R-devel
Things work as I would expect if you give stop() a condition object instead of a string: makeError <- function(message, class = "simpleError", call = sys.call(-2)) { structure(list(message=message, call=call), class=c(class, "error", "condition")) } f0 <- function() {

[Rd] tryCatch in on.exit()

2017-12-01 Thread William Dunlap via R-devel
The following example involves a function whose on.exit() expression both generates an error and catches the error. The body of the function also generates an error. When calling the function wrapped in a tryCatch, should that tryCatch's error function be given the error from the body of the