insightsengineering / cards

CDISC Analysis Results Data
https://insightsengineering.github.io/cards/
24 stars 0 forks source link

Improve error message in `alias_as_fmt_fn()` #179

Closed ddsjoberg closed 3 months ago

ddsjoberg commented 5 months ago

We're returning this error when the formatting function is not valid

cli::cli_abort("Formatting functions/aliases must be a function, a non-negative integer, or a formatting string, e.g. {.val xx.x}.", call = call)

But this would be better if we referenced the statistic and the variable, so the user knows which functions are incorrect.