Clearer error message if weather data is not found #7

Merged
merged 1 commit into from Jun 14, 2013

Conversation

Projects
None yet
2 participants
Contributor

marktabler commented Jun 22, 2012

I ran into a problem where I fatfingered my zip code during testing, and the error message when you ask for the current_conditions of a bad zip code is "object does not respond to #inspect". I spent a little time troubleshooting before I realized the problem was in my location input.

This pull request adds a very simple rescue clause to the end of Data#inspect to clear up the nature of the problem without actually raising an exception. It's a small change, but it might save someone down the road a few minutes of troubleshooting time.

@jnunemaker jnunemaker added a commit that referenced this pull request Jun 14, 2013

@jnunemaker jnunemaker Merge pull request #7 from marktabler/master
Clearer error message if weather data is not found
293b970

@jnunemaker jnunemaker merged commit 293b970 into jnunemaker:master Jun 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment