- message
- The message to display, formatted as a bulleted
list. The first element is displayed as an alert bullet
prefixed with - !by default. Elements named- "*",- "i",- "v",- "x", and- "!"are formatted as regular, info, success,
failure, and error bullets respectively. See Formatting messages with cli
for more about bulleted messaging.
 - If a message is not supplied, it is expected that the message is
generated lazily through - cnd_header()and- cnd_body()methods. In that case,- classmust be supplied. Only- inform()allows empty messages as it is occasionally useful to build user
output incrementally.
 - If a function, it is stored in the - headerfield of the error
condition. This acts as a- cnd_header()method that is invoked
lazily when the error message is displayed.
 
- class
- Subclass of the condition. 
- ...
- Additional data to be stored in the condition object.
If you supply condition fields, you should usually provide a
- classargument. You may consider prefixing condition fields
with the name of your package or organisation to prevent name
collisions.
 
- call
- The execution environment of a currently running
function, e.g. - call = caller_env(). The corresponding function
call is retrieved and mentioned in error messages as the source
of the error.
 - You only need to supply - callwhen throwing a condition from a
helper function which wouldn't be relevant to mention in the
message.
 - Can also be - NULLor a defused function call to
respectively not display any call or hard-code a code to display.
 - For more information about error calls, see Including function calls in error messages. 
- body, footer
- Additional bullets. 
- trace
- A - traceobject created by- trace_back().
 
- parent
- Supply - parentwhen you rethrow an error from a
condition handler (e.g. with- try_fetch()).
 - 
- If - parentis a condition object, a chained error is
created, which is useful when you want to enhance an error with
more details, while still retaining the original information.
 
- If - parentis- NA, it indicates an unchained rethrow, which
is useful when you want to take ownership over an error and
rethrow it with a custom message that better fits the
surrounding context.
 - Technically, supplying - NAlets- abort()know it is called
from a condition handler. This helps it create simpler
backtraces where the condition handling context is hidden by
default.
 
 
For more information about error calls, see Including contextual information with error chains.
- use_cli_format
- Whether to format - messagelazily using
cli if available. This results in
prettier and more accurate formatting of messages. See- local_use_cli()to set this condition field by default in your
package namespace.
 - If set to - TRUE,- messageshould be a character vector of
individual and unformatted lines. Any newline character- "\\n"already present in- messageis reformatted by cli's paragraph
formatter. See Formatting messages with cli.
 
- .inherit
- Whether the condition inherits from - parentaccording to- cnd_inherits()and- try_fetch(). By default,
parent conditions of higher severity are not inherited. For
instance an error chained to a warning is not inherited to avoid
unexpectedly catching an error downgraded to a warning.
 
- .internal
- If - TRUE, a footer bullet is added to- messageto let the user know that the error is internal and that they
should report it to the package authors. This argument is
incompatible with- footer.
 
- .file
- A connection or a string specifying where to print the
message. The default depends on the context, see the - stdoutvs- stderrsection.
 
- .frame
- The throwing context. Used as default for
- .trace_bottom, and to determine the internal package to mention
in internal errors when- .internalis- TRUE.
 
- .trace_bottom
- Used in the display of simplified backtraces
as the last relevant call frame to show. This way, the irrelevant
parts of backtraces corresponding to condition handling
(- tryCatch(),- try_fetch(),- abort(), etc.) are hidden by
default. Defaults to- callif it is an environment, or- .frameotherwise. Without effect if- traceis supplied.
 
- .subclass
![[Deprecated]](figures/lifecycle-deprecated.svg?package=rlang&version=1.1.6) This argument
was renamed to This argument
was renamed to- classin rlang 0.4.2 for consistency with our
conventions for class constructors documented in
https://adv-r.hadley.nz/s3.html#s3-subclassing.
 
- .frequency
- How frequently should the warning or message be
displayed? By default (- "always") it is displayed at each
time. If- "regularly", it is displayed once every 8 hours. If- "once", it is displayed once per session.
 
- .frequency_id
- A unique identifier for the warning or
message. This is used when - .frequencyis supplied to recognise
recurring conditions. This argument must be supplied if- .frequencyis not set to- "always".
 
- id
- The identifying string of the condition that was supplied
as - .frequency_idto- warn()or- inform().