Skip to content

Use updates error handling  #271

Description

@EmilHvitfeldt

In the following error I think we could improve it in 2 ways:

  • Make it so it says the error comes from degree() not new_quant_param()
  • Show that the wrong input was, in this case integer not double
library(dials)
#> Loading required package: scales
degree(1L)
#> Error in `new_quant_param()`:
#> ! Since `type = 'double'`, please use that data type for the range.

#> Backtrace:
#>     ▆
#>  1. └─dials::degree(1L)
#>  2.   └─dials::new_quant_param(...)
#>  3.     └─dials:::check_range(range, type, trans)
#>  4.       └─rlang::abort(msg, call = call)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions