roxy_tag() is the constructor for tag objects.
roxy_tag_warning() is superseded by warn_roxy_tag(); use to generate a
warning that includes the location of the tag.
Usage
roxy_tag(tag, raw, val = NULL, file = NA_character_, line = NA_character_)
roxy_tag_parse(x)
roxy_tag_warning(x, ...)
warn_roxy_tag(tag, message, parent = NULL, envir = parent.frame())Arguments
- tag
Tag name. Arguments starting with
.are reserved for internal usage.- raw
Raw tag value, a string.
- val
Parsed tag value, typically a character vector, but sometimes a list. Usually filled in by
tag_parsers- file, line
Location of the tag
- x
A tag
- ...
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.- message
Warning message
- parent
Supply
parentwhen you rethrow an error from a condition handler (e.g. withtry_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
parentisNA, 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
NAletsabort()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.
- envir
passed to
rlang::warn()as.envir.
Methods
Define a method for roxy_tag_parse to support new tags. See tag_parsers
for more details.
See also
Other extending:
load_options(),
parse_package(),
rd_section(),
roc_proc_text(),
roclet_find(),
roxy_block(),
roxy_tag_rd(),
tag_parsers,
tags_list()
