shinyobjects icon indicating copy to clipboard operation
shinyobjects copied to clipboard

Better error msg

Open rjake opened this issue 5 years ago • 0 comments

eval_code <- function(x, envir = NULL) {
  as_char_x <- substr(as.character(x), 1, 100)

  tryCatch(
    eval(x, envir = envir),
    error = function(e) {
      message("error: could not parse")
      print(as_char_x)
    },
    warning = function(w) {
      message("warning:")
      print(as_char_x)
    }
  )
}

rjake avatar Dec 12 '20 23:12 rjake