try.CATCH: tryCatch both warnings (with value) and errors

Description Usage Arguments Details Value Author(s)

View source: R/fRedsRutils.R

Description

TRY <e2><80><a6> CATCH

Usage

1
try.CATCH(expr)

Arguments

expr

an R expression to evaluate

Details

In longer simulations, aka computer experiments, you may want to 1) catch all errors and warnings (and continue) 2) store the error or warning messages

Here's a solution (see R-help mailing list, Dec 9, 2010):

Catch *and* save both errors and warnings, and in the case of a warning, also keep the computed result.

Value

a list with 'value' and 'warning', where value' may be an error caught.

Author(s)

Martin Maechler; Copyright (C) 2010-2012 The R Core Team


FredHasselman/nlRtsa documentation built on May 6, 2019, 5:07 p.m.