Skip to content

Clean up error messages and assertions #380

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

Closed
2 of 3 tasks
dajmcdon opened this issue Nov 27, 2023 · 3 comments · Fixed by #413
Closed
2 of 3 tasks

Clean up error messages and assertions #380

dajmcdon opened this issue Nov 27, 2023 · 3 comments · Fixed by #413
Assignees

Comments

@dajmcdon
Copy link
Contributor

dajmcdon commented Nov 27, 2023

  • Add helper functions to validate f_args
  • Remove the Abort / Warn plugins
  • Replace all warnings/errors with functions from {cli} and appropriate error messages.
@dshemetov
Copy link
Contributor

@dajmcdon do we still need (1) if we're using checkmate?

@dajmcdon
Copy link
Contributor Author

Possibly. Or, maybe 1 simply gets subsumed with 2.

@dshemetov
Copy link
Contributor

Got it. I'm starting to notice a lot of hand-written arg validation functions like:

validate_version_bound <- function(version_bound, x, na_ok,
                                   version_bound_arg = rlang::caller_arg(version_bound),
                                   x_arg = rlang::caller_arg(version_bound)) {

I'm thinking we can replace these with checkmate calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants