catch_error: Capture and parse an error message

View source: R/function.R

catch_errorR Documentation

Capture and parse an error message

Description

Extract the object or function name from an error message.

Usage

catch_error(sentence = geterrmessage())

Arguments

sentence

An error message to parse. Defaults to the last error message.

Value

A character vector with extracted names, or 'character(0)' if no match is found.

Examples

catch_error()
catch_error("Error: object 'iri' not found\n")
catch_error("Error: object 'view' not found\n")

fcuk documentation built on Feb. 26, 2026, 5:06 p.m.