Learn R Programming

FastUtils (version 0.2.1)

getFailStr: Get Failure Message as a character

Description

[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)

Value

A character string containing the failure message.

Arguments

cond

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

Examples

Run this code
tryCatch(stop("Example error"), error = function(e) getFailStr(e))

Run the code above in your browser using DataLab