report_error: Report errors and warnings

View source: R/report_error.R

report_errorR Documentation

Report errors and warnings

Description

Provides a consistent style for errors and warnings.

Usage

report_error(
  faulty_input,
  error_condition,
  requirement,
  context = NULL,
  advice,
  hint = NULL,
  halt = TRUE
)

Arguments

faulty_input

Unquoted function argument that is the cause of the error condition.

error_condition

A sentence explaining the condition that invoked the error.

requirement

A sentence that explains what is required.

context

(Optional) A sentence that contextualizes the error

advice

Advice for the user to avoid the error.

hint

If the input can be guessed,

halt

(logical, default: TRUE) Should the function signal an error and halt?


HughParsonage/hutils documentation built on Feb. 12, 2023, 8:26 a.m.