cli_output: Message signaling nested with progress reporting

Description Usage Arguments Value Examples

Description

In order to not interrupt progress reporting by a progress::progress_bar, messages are wrapped with class msg_progress which causes them to be captured printed after progress bar completion. This function is intended to be used when signaling messages in callback functions.

Usage

1
2
3
msg_progress(..., envir = parent.frame())

fmt_msg(msg, envir = parent.frame(), indent = 0L, exdent = 0L)

Arguments

...

Passed to base::.makeMessage()

envir

Environment in this objects from msg are evaluated

msg

String valued message

indent, exdent

Vector valued and mapped to fansi::strwrap2_ctl()

Value

Called for side effects and returns NULL invisibly.

Examples

1
2
3
4
5
6
7
msg_progress("Foo", "bar")

capt_fun <- function(x) {
  message("captured: ", conditionMessage(x))
}

tryCatch(msg_progress("Foo", "bar"), msg_progress = capt_fun)

ricu documentation built on Oct. 7, 2021, 9:06 a.m.