Skip to content
(💣💣💣)🔜💣 Deferrable errors
R Makefile Shell
Branch: master
Clone or download
Latest commit b9f9337 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Spelling Aug 9, 2019
man Spelling Aug 9, 2019
scripts Add docs infra Aug 13, 2019
tests Use conditionMessage to construct the message Aug 9, 2019
.Rbuildignore Add a website Aug 9, 2019
.gitignore Add docs infra Aug 13, 2019
.travis.yml Add travis Aug 8, 2019
DESCRIPTION Spelling Aug 9, 2019
LICENSE Initial import Aug 8, 2019
Makefile Add a website Aug 9, 2019
NAMESPACE Use conditionMessage to construct the message Aug 9, 2019
README.Rmd Add link to blog post Aug 9, 2019
README.md Add link to blog post Aug 9, 2019

README.md

defer

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Build Status codecov.io

Defer errors

Proof-of-concept for collecting up errors from a code block and throwing them at all once.

check_positive <- function(x) {
  if (x < 0) {
    defer::deferrable_error(paste("got a negative number:", x))
  }
}

defer::defer_errors({
  check_positive(0)
  check_positive(-1)
  check_positive(-2)
})
## Error: 2 errors occured:
##   - got a negative number: -1
##   - got a negative number: -2

For more information see our blog post

Installation

For now, install directly from github

remotes::install_github("reside-ic/defer")

License

MIT © Imperial College of Science, Technology and Medicine

You can’t perform that action at this time.