[R-pkg-devel] http error handling in packages
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Wed Sep 8 11:06:45 CEST 2021
On Wed, 8 Sep 2021 12:02:51 +1200
obrl soil <obrlsoilau using gmail.com> wrote:
> I just want to clarify whether the problem is an overly brief error
> message, or my use of stop() in this context?
I think it's neither: it's perfectly fine to use the R error system to
signal being unable to establish function postconditions, but then the
tests shouldn't fail because of that (yes, including the \donttest{}
ones).
So, in my opinion, both stop() and the error message are okay, but the
example should wrap them in try() / tryCatch() and check the return
value correctly.
--
Best regards,
Ivan
More information about the R-package-devel
mailing list