devOpifex / erratum

Error & warning handling for R inspired by go

Home Page:http://erratum.opifex.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

#install.packages("remotes")
remotes::install_github("devOpifex/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.

About

Error & warning handling for R inspired by go

http://erratum.opifex.org

License:GNU Affero General Public License v3.0


Languages

Language:R 100.0%