Skip to content

reside-ic/defer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

(:bomb::bomb::bomb:):soon::bomb: Deferrable errors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published