R/conditions.R

Defines functions condition

# create a custom condition
# Taken from Hadley Wickham: http://adv-r.had.co.nz/beyond-exception-handling.html
condition <- function(class, message = "", ...) {

  call <- sys.call(-1)   # function call that created the condition

  structure(
    class = c(class, "condition"),
    list(message = message, call = call, ...)
  )

}

Try the tryCatchLog package in your browser

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

tryCatchLog documentation built on Oct. 25, 2021, 9:08 a.m.