R/utils.R

Defines functions suppress_msg

suppress_msg <- function(expr, pattern = c("reserved SQL", "not overwriting")){
withCallingHandlers(expr,
                    message = function(e){
                      if(any(vapply(pattern, grepl, logical(1), e$message)))
                        invokeRestart("muffleMessage")
                    })
}
cboettig/taxadb documentation built on April 17, 2024, 6:34 p.m.