search for: benedito

Displaying 3 results from an estimated 3 matches for "benedito".

2018 Nov 23
1
[tryExcept] New try Function
...'try' in order to print the error if desired. All in all, this would be a function for simple error handling, but I think it would be practical, and you can always move to tryCatch if you need a more complex error handling. I will be looking forward to hearing your insights. Best, Ernest Benedito Missatge de Emil Bode <emil.bode at dans.knaw.nl> del dia dv., 23 de nov. 2018 a les 13:17: > Hi Ernest, > > To start: I don't see an attachment, I think they're not (always) allowed > on this mailing-list. If you want to send something, text is your safest > bet. &gt...
2018 Nov 22
2
[tryExcept] New try Function
Hi everyone, When dealing with errors, sometimes I want to run a bunch of code when an error occurs. For now I usually use a structure such as: res <- tryCatch(expr, error = function(cond) cond) # or try(expr) if (inherits(res, ?error?)) # or inherits(res, ?try-error?) # a bunch of code I though it would be useful to have a function that does this naturally, so I came up with the attached
2018 Nov 23
0
[tryExcept] New try Function
...is cumbersome, and it gets even more cumbersome if you want to access the error-object in #abunchofcode, or use #abunchofcode to return to a higher level, so I get it you're looking for a more elegant solution. Best regards, Emil Bode ?On 23/11/2018, 08:49, "R-devel on behalf of Ernest Benedito" <r-devel-bounces at r-project.org on behalf of ebeneditos at gmail.com> wrote: Hi everyone, When dealing with errors, sometimes I want to run a bunch of code when an error occurs. For now I usually use a structure such as: res <- tryCatch(expr, error = func...