Capture and parse an error message.

catch_error(sentence = geterrmessage())

Arguments

sentence

an error message to parse

Examples

catch_error()
#> character(0)
catch_error("Error: object 'iri' not found\n")
#> [1] "iri"
catch_error("Error: object 'view' not found\n")
#> [1] "view"