Skip to content
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

More informative error message with wrong arguments #69

Closed
Nelson-Gon opened this issue Feb 11, 2022 · 1 comment
Closed

More informative error message with wrong arguments #69

Nelson-Gon opened this issue Feb 11, 2022 · 1 comment

Comments

@Nelson-Gon
Copy link

Hi,

Thank you for the great work. I was using withSpinner and realised that sometimes we get an error message that may not immediately let us know what is going on, reprex next

shinycssloaders::withSpinner(
   
   br(),
  dataTableOutput("test")
 
 )

The above fails, rightly so, with

Error in shinycssloaders::withSpinner(br(), dataTableOutput("test")) :
type %in% 0:8 is not TRUE

I think it would be great if the error would specify for example that br was not an expected argument/input.

Thank you,

NelsonGon

@daattali
Copy link
Owner

In this case, br() is the first argument, so dataTableOutput() is actually the unexpected type argument.

I agree better error messages would be useful, feel free to submit a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants