Learn R Programming

fcuk (version 0.2.0)

catch_error: Capture and parse an error message

Description

Extract the object or function name from an error message.

Usage

catch_error(sentence = geterrmessage())

Value

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

Arguments

sentence

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

Examples

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

Run the code above in your browser using DataLab