Skip to contents

[Experimental]

This function generates a failure message string from a given condition. The message includes the context of the call and the specific condition message.

Usage

getFailStr(cond)

Arguments

cond

A condition object representing an error or warning - probably from a tryCatch() statement.

Value

A character string containing the failure message.

Examples

tryCatch(stop("Example error"), error = function(e) getFailStr(e))
#> [1] "in doTryCatch(return(expr), name, parentenv, handler): Example error"