rlang 0.4.2
-
New
cnd_header(),cnd_body()andcnd_footer()generics. These
are automatically called byconditionMessage.rlang_error(), the
default method for all rlang errors.Concretely, this is a way of breaking up lazy generation of error
messages withconditionMessage()into three independent
parts. This provides a lot of flexibility for hierarchies of error
classes, for instance you could inherit the body of an error message
from a parent class while overriding the header and footer. -
The reminder to call
last_error()is now less confusing thanks to
a suggestion by @markhwhiteii. -
The functions prefixed in
scoped_have been renamed to use the
more conventionallocal_prefix. For instance,scoped_bindings()
is nowlocal_bindings(). Thescoped_functions will be
deprecated in the next significant version of rlang (0.5.0). -
The
.subclassargument ofabort(),warn()andinform()has
been renamed toclass. This is for consistency with our
conventions for class constructors documented in
https://adv-r.hadley.nz/s3.html#s3-subclassing. -
inform()now prints messages to the standard output by default in
interactive sessions. This makes them appear more like normal output
in IDEs such as RStudio. In non-interactive sessions, messages are
still printed to standard error to make it easy to redirect messages
when running R scripts (#852). -
Fixed an error in
trace_back()when the call stack contains a
quosured symbol. -
Backtrace is now displayed in full when an error occurs in
non-interactive sessions. Previously the backtraces of parent errors
were left out.