Hello there. Thank you for your work on this package!
Do you have any suggestions for how to include tibble previews in error messages? Currently, our work around is something along the lines of: use the built-in tibble print with capture output, collapse the resulting character vector with newlines, and then insert that into a cli_abort message. Are there more ergonomic ways to do this or perhaps a different set of best practices?
We use cli in the internals of a time series forecasting package built on top of tidymodels, where it is very helpful to print the data context in an error because errors often stem from data anomalies.
I don't think this is possible currently, unfortunately. cli_abort() prints a list of bullet points, where each bullet point is a paragraph that can only have inline formatting.
Hello there. Thank you for your work on this package!
Do you have any suggestions for how to include tibble previews in error messages? Currently, our work around is something along the lines of: use the built-in tibble print with capture output, collapse the resulting character vector with newlines, and then insert that into a
cli_abort
message. Are there more ergonomic ways to do this or perhaps a different set of best practices?We use cli in the internals of a time series forecasting package built on top of tidymodels, where it is very helpful to print the data context in an error because errors often stem from data anomalies.
cc @brookslogan