Skip to content
Prev 366692 / 398502 Next

help using tryCatch

The 'error' argument to tryCatch must be a function (of one argument,
the exception).  Its return value will be the return value of tryCatch
if there is an error.  Hence you should change the present
    error = return(TBAPrice)
to
    error = function(exception) TBAPrice

You can use
    error = function(exception) return(TBAPrice)
if you prefer to use explicit return statements.

You could also examine conditionMessage(exception) or class(exception)
to see if it is the error you expect.

Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Jan 19, 2017 at 8:39 AM, Glenn Schultz <glennmschultz at me.com> wrote: