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

Handle errors in value generation #13

Open
g105b opened this issue Sep 16, 2022 · 0 comments
Open

Handle errors in value generation #13

g105b opened this issue Sep 16, 2022 · 0 comments

Comments

@g105b
Copy link
Member

g105b commented Sep 16, 2022

In the example directory, 01-latlon.php makes an HTTP call, but what if the curl process times out, or what if the response isn't valid JSON?

It might be useful to be able to cache null, so simply returning null might not be the best solution. A better solution might be to throw a CacheValueGenerationException, which can be internally caught and ignored.

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

1 participant