R/tracestack.R

Defines functions tracestack

Documented in tracestack

#'  Search Stack Overflow for your most recent error message.
#'
#' @export
tracestack <- function() {
  if (interactive()) {
    last_error <- geterrmessage()
    if (is.null(last_error)) {
      stop("No error message available")
    }

    query <- utils::URLencode(paste("[r]", last_error))
    utils::browseURL(paste0("http://stackoverflow.com/search?q=", query))
  }
}
ropenscilabs/arresteddev documentation built on June 23, 2017, 9:59 a.m.