From d6ea31e0772d2096ede5e689f73e219ac35a5878 Mon Sep 17 00:00:00 2001 From: Fran Barton Date: Thu, 26 Mar 2026 15:17:32 +0000 Subject: [PATCH] :ship: Export check_* functions properly this time Should close #84 (again) --- R/helpers.R | 6 ++++++ man/cst_error_msg.Rd | 14 ++++++++++++++ man/ct_error_msg.Rd | 14 ++++++++++++++ man/cv_error_msg.Rd | 14 ++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 man/cst_error_msg.Rd create mode 100644 man/ct_error_msg.Rd create mode 100644 man/cv_error_msg.Rd diff --git a/R/helpers.R b/R/helpers.R index 18afcd0..a33a5fe 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -21,6 +21,8 @@ check_that <- function(x, predicate, message, pf = parent.frame()) { } +#' A custom error message generator for the `check_that` function +#' @param text The main text of the error message #' @export ct_error_msg <- \(text) paste0("{.fn check_that}: ", text) @@ -63,6 +65,8 @@ check_vec <- function( } } +#' A custom error message generator for the `check_vec` function +#' @inheritParams ct_error_msg #' @export cv_error_msg <- \(text) paste0("{.fn check_vec}: ", text) @@ -108,6 +112,8 @@ check_scalar_type <- function( } } +#' A custom error message generator for the `check_scalar_type` function +#' @inheritParams ct_error_msg #' @export cst_error_msg <- \(text) paste0("{.fn check_scalar_type}: ", text) diff --git a/man/cst_error_msg.Rd b/man/cst_error_msg.Rd new file mode 100644 index 0000000..533dd74 --- /dev/null +++ b/man/cst_error_msg.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{cst_error_msg} +\alias{cst_error_msg} +\title{A custom error message generator for the \code{check_scalar_type} function} +\usage{ +cst_error_msg(text) +} +\arguments{ +\item{text}{The main text of the error message} +} +\description{ +A custom error message generator for the \code{check_scalar_type} function +} diff --git a/man/ct_error_msg.Rd b/man/ct_error_msg.Rd new file mode 100644 index 0000000..91aff69 --- /dev/null +++ b/man/ct_error_msg.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{ct_error_msg} +\alias{ct_error_msg} +\title{A custom error message generator for the \code{check_that} function} +\usage{ +ct_error_msg(text) +} +\arguments{ +\item{text}{The main text of the error message} +} +\description{ +A custom error message generator for the \code{check_that} function +} diff --git a/man/cv_error_msg.Rd b/man/cv_error_msg.Rd new file mode 100644 index 0000000..c701258 --- /dev/null +++ b/man/cv_error_msg.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{cv_error_msg} +\alias{cv_error_msg} +\title{A custom error message generator for the \code{check_vec} function} +\usage{ +cv_error_msg(text) +} +\arguments{ +\item{text}{The main text of the error message} +} +\description{ +A custom error message generator for the \code{check_vec} function +}