R/stop.R

Defines functions winch_stop

Documented in winch_stop

#' Raise an error from native code
#'
#' Primarily intended for testing.
#'
#' @param message The error message.
#'
#' @seealso [winch_call()]
#'
#' @return This function throws an error and does not return.
#' @export
#' @examples
#' try(winch_stop("Test"))
winch_stop <- function(message) {
  .Call(winch_c_stop, enc2native(message))
}

Try the winch package in your browser

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

winch documentation built on April 20, 2023, 9:14 a.m.