R/errors.R

Defines functions UserError DeveloperError

UserError <- function(reason, msg){
  if( tolower(reason) == 'input' ) {
    e <- simpleError(msg)
    stop(e)
  }
}

DeveloperError <- function(msg, place){

  cat("You have discovered a bug in DynTxRegime.\n")
  cat("Please forward the following information to sthollow@ncsu.edu.\n")
  cat(msg, " received from ", place, "\n")
  e <- simpleError("End Error Report")
  stop(e)

}

Try the DynTxRegime package in your browser

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

DynTxRegime documentation built on May 2, 2019, 5:21 p.m.