tidymodels / dials

Tools for creating tuning parameter values
https://dials.tidymodels.org/
Other
114 stars 27 forks source link

Pass `call` down the parameter constructor to the error #291

Closed hfrick closed 1 year ago

hfrick commented 1 year ago

This PR enables passing the call down to the abort() calls of the various checks in the two constructors new_quant_param() and new_qual_param().

This means that passing an incorrect range to one of the parameter functions will lead to that call being shown, rather than the constructor, and so addresses the first part of #271

library(dials)
#> Loading required package: scales

degree(1L)
#> Error in `degree()`:
#> ! Since `type = 'double'`, please use that data type for the range.

Created on 2023-03-29 with reprex v2.0.2

github-actions[bot] commented 1 year ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.