-
Notifications
You must be signed in to change notification settings - Fork 64
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
explore using classed errors in rlang's abort, warn, inform #375
Comments
Nice. I imagine this is for tidying up the error messages etc. But it might also be applied to the internal error handling here? The |
Yeah so my understanding is that we can give it a special class for these types of problems/errors, which might be useful for writing other interfaces to ignore/record these errors. My rough understanding is that we can use |
See also the glubort helper function that a lot of tidyverse pkgs seem to use: https://github.com/DavisVaughan/slider/blob/579c3042d51fc48fb400d2dd6810a2677756e695/R/utils.R#L1-L3 |
Another helper is |
Just adding another description of classed errors here: https://www.mm218.dev/posts/2023-11-07-classed-errors/ |
https://rlang.r-lib.org/reference/abort.html
This allows for classed errors to be passed to the user as well as doing nicer printing of the error messages.
The user then might be able to control what happens with the error, e.g.,
as it states in the documentation
The text was updated successfully, but these errors were encountered: