R/error.R

#' Response class
#'
#' @import R6
Error<-
  R6Class("Error",
          public=list(
            errors=c(),
            set=function(err){
              self$errors<-c(self$errors, as.character(err))
            }
          ),
          active=list(
            occurred=function(){
              return(length(self$errors)>0)
            }
          )
  )

#' Create response instance
#'
new_error<-function(){
  Error$new()
}

Try the jug package in your browser

Any scripts or data that you put into this service are public.

jug documentation built on May 1, 2019, 10:31 p.m.