catch_either: Try excute function which might throw exception.

View source: R/exception.R

catch_eitherR Documentation

Try excute function which might throw exception.

Description

Try execute function which might throw exception.

Usage

catch_either(value, alt_value, catchfn = NULL)

Arguments

value

Value which might be exception.

alt_value

return value when expr throw exception.

catchfn

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

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.