Learn R Programming

⚠️There's a newer version (2.2.0) of this package.Take me there.

Docs | Quick start | Install

Erratum handles errors and warnings in a manner inspired by Go's standard error library.

install.packages("erratum")

Example

library(erratum)

err <- e("Input must be a numeric")
err$rule <- is.numeric

safe_log <- function(x){
  err$check(x)

  log(x)
}

safe_log("two")

Code of Conduct

Please note that the erratum project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('erratum')

Monthly Downloads

21

Version

2.1.0

License

AGPL-3

Maintainer

John Coene

Last Published

February 22nd, 2021

Functions in erratum (2.1.0)

check_tmpl

Check Template
latch

Latch an Error or a Warning
chk

Check
jab

Take a Jab
Warning

Error
Error

Error
raise

Raisers
checks

Check
ew

Handlers
Issue

Core Class
template

Templates
tmpl

Fetch Default Templates
resolves

Resolve Errors and Warnings
skip

Skip