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

Do a better job of checking the supplied year is valid #46

Open
Moohan opened this issue Mar 6, 2023 · 0 comments · Fixed by #48
Open

Do a better job of checking the supplied year is valid #46

Moohan opened this issue Mar 6, 2023 · 0 comments · Fixed by #48

Comments

@Moohan
Copy link
Member

Moohan commented Mar 6, 2023

This should give a good error.

slfhelper::read_slf_episode("2022", "recid")

This code should be doing this but doesn't for some reason: https://github.com/Public-Health-Scotland/slfhelper/blob/production/R/format_year.R.

Ideally, we would have a super helpful error message along the lines of: error in read_slf_ep() the year “2022” isn’t a valid year, did you mean ‘2021’ or ‘2122’?”.

@Moohan Moohan linked a pull request Mar 7, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant