Skip to content

rlang 0.4.2

Choose a tag to compare

@lionel- lionel- released this 25 Nov 13:47
  • New cnd_header(), cnd_body() and cnd_footer() generics. These
    are automatically called by conditionMessage.rlang_error(), the
    default method for all rlang errors.

    Concretely, this is a way of breaking up lazy generation of error
    messages with conditionMessage() 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 conventional local_ prefix. For instance, scoped_bindings()
    is now local_bindings(). The scoped_ functions will be
    deprecated in the next significant version of rlang (0.5.0).

  • The .subclass argument of abort(), warn() and inform() has
    been renamed to class. 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.