Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cli errors #457

Closed
11 tasks done
hfrick opened this issue Oct 31, 2023 · 2 comments
Closed
11 tasks done

Use cli errors #457

hfrick opened this issue Oct 31, 2023 · 2 comments
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@hfrick
Copy link
Member

hfrick commented Oct 31, 2023

Most or all errors thrown in this package are made via rlang::abort(). We are transitioning to cli::cli_abort() to make use of the richer styling options for errors via cli (which calls rlang under the hood).

It is often sufficient to search for and replace the rlang version with the cli version together with adding a little bit of styling.

Some examples of the styling possibilities are in the general introduction under the section of Inline text formatting. More details on inline formatting and pluralization.

One aspect to watch out for when transitioning from rlang::abort() to cli::cli_abort() are messages pre-assembled from user input as described here.

#499 can serve as an example.

We are splitting this up into several batches:

@hfrick
Copy link
Member Author

hfrick commented Sep 12, 2024

Closing this after all the tidy dev day PRs! Thank you @PriKalra @Dpananos and @JamesHWade!! 🙌

@hfrick hfrick closed this as completed Sep 12, 2024
@PriKalra
Copy link
Contributor

Thank you @hfrick for the patience and the opportunity! I will come back to support again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

No branches or pull requests

2 participants