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))
}
r-prof/winch documentation built on June 12, 2025, 10:56 p.m.