UrbanInstitute / education-data-package-stata

MIT License
19 stars 4 forks source link

Error messages for data that does not exist #38

Closed grahamimac closed 6 years ago

grahamimac commented 6 years ago

From Matt:

I just want to confirm that these are the errors we expect when asking for a year of data that does not exist (this file begins in 1991):

. educationdata using "college ipeds fall-enrollment age", sub(year=1990:2000 age=21) clear
Invalid Option selection: 1990 in 1990:2000

. educationdata using "college ipeds fall-enrollment age", sub(year=1990 age=21) clear
Please be patient - Downloading data from API. I'll give you a time estimate shortly.
Error -675, Unable to open URL: server reported server error
          getalltables():  3010  attempt to dereference NULL pointer
            getalldata():     -  function returned error
                 <istmt>:     -  function returned error
r(3010);
grahamimac commented 6 years ago

@ericatheresa @mchingos @khueyama

On the first example, the behavior is strict, so it will tell you when years don't exist and ask to reformulate. What you want the package to spit out here is totally up to you!

On the second example, that's an error in my program, which I'll flag to fix in the next release. It will eventually say Invalid Options selection: 1990 in year.

mchingos commented 6 years ago

Got it; thanks!

grahamimac commented 6 years ago

This is now resolved for the next release and tested. I will close this issue when the release comes out next week.