[R-pkg-devel] Internet resources and Errors

Roy Mendelssohn - NOAA Federal roy@mende|@@ohn @end|ng |rom no@@@gov
Fri Sep 24 21:55:18 CEST 2021


try/stop is in the operational code.  But it is easy enough to make it so that the code always returns something, even when there is an internet access problem.

As I said,  if  "failing gracefully" and ever actually been defined with examples life would have been much easier for a number of packages developers.

-Roy


> On Sep 24, 2021, at 10:55 AM, Greg Minshall <minshall using umich.edu> wrote:
> 
> Roy,
> 
>> All internet calls are wrapped in 'try()'.  If that shows an error, I
>> write a message to the screen about the error, and call stop(),
>> perhaps with a further message in that call.
> 
> out of ignorance, i ask ...
> 
> in your package's operational code ("its API", or whatever), when a
> required internet access fails, i would think a message and a stop(),
> might be the reasonable thing to do.
> 
> in examples or tests, either doing the access itself, or calling your
> operational code, one might try() and not stop(), but, rather, go on to
> the next example/test.
> 
> in your comment above, is the try()/stop() in your operational code or
> in your tests/examples?
> 
> cheers, Greg

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn using noaa.gov www: https://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-package-devel mailing list