Skip to content

Better errors and tests for getLocation #104

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

Merged
merged 1 commit into from
May 12, 2021
Merged

Conversation

jsmarr
Copy link

@jsmarr jsmarr commented May 12, 2021

  • Throw a LocationNotFoundException with a custom message if the timezone database hasn't yet been initialized (makes it easier for developers to discover how to fix the isssue)
  • Add a test for this custom error message
  • Add a (missing) test for the other time getLocation throws a LocationNotFoundException (unrecognized timezone)

* Throw if timezone database isn't initialized

* Test for initialization exception

* Test for unrecognized timezone
Copy link
Owner

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srawlins srawlins merged commit 5a25c26 into srawlins:master May 12, 2021
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 this pull request may close these issues.

2 participants