Examples for 'rlang::format_error_bullets'


Format bullets for error messages

Aliases: format_error_bullets

Keywords:

### ** Examples

# All bullets
writeLines(format_error_bullets(c("foo", "bar")))
• foo
• bar
# This is equivalent to
writeLines(format_error_bullets(set_names(c("foo", "bar"), "*")))
• foo
• bar
# Supply named elements to format info, cross, and tick bullets
writeLines(format_error_bullets(c(i = "foo", x = "bar", v = "baz", "*" = "quux")))
ℹ foo
✖ bar
✔ baz
• quux
# An unnamed element breaks the line
writeLines(format_error_bullets(c(i = "foo\nbar")))
ℹ foo
bar
# A " " element breaks the line within a bullet (with indentation)
writeLines(format_error_bullets(c(i = "foo", " " = "bar")))
ℹ foo
  bar

[Package rlang version 1.1.4 Index]