try_catch: Try excute function which might throw exception.

View source: R/exception.R

try_catchR Documentation

Try excute function which might throw exception.

Description

Try excute function which might throw exception.

Usage

try_catch(expr, catchfn, silent = TRUE)

Arguments

expr

Function which should be excuted.

catchfn

Function which will be called when expr throw exception with error message as argument.

silent

Logical value: if TRUE, the error message is not shown.

Value

return value if expr don't throw, or exception if it throw.


hmito/hmRLib documentation built on March 13, 2024, 9:41 p.m.