dies.ok {AnalysisPageServer} | R Documentation

## dies.ok

### Description

Test that an expression throws an error

### Usage

    dies.ok(call, regex, testname)

### Arguments

`call` | An expression to evaluate
`regex` | A regular expression to match the error against. If omitted then don't test the exception text.
`testname` | A name for the test. Defaults to deparsing the call.

### Details

Test that an expression throws an error.

### Value

Runs one or two tests (the second test to match the error message against regex, if it was provided and if an error was successfully thrown).

### Author(s)

Brad Friedman

### Examples

    dies.ok(stop("foo"), "foo", "it stops")

[Package AnalysisPageServer version 1.20.0 Index]