R/error.R

Defines functions handle_exception

# This file contains exception checking and error handling functions

#
# exception handling function for malformed input in lindia
#
handle_exception <- function(input, function_name){
   
   type = class(input)
   
   # exception handling : input not lm object
   if (type != "lm"){
      stop(paste(function_name, "doesn't know how to handle non-lm object"))
   }
   
}

Try the lindia package in your browser

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

lindia documentation built on Aug. 11, 2023, 1:09 a.m.