pachadotdev / gravity

R package that provides estimation methods for Gravity Models
https://pacha.dev/gravity/
Apache License 2.0
34 stars 14 forks source link

error messages #8

Closed DiegoKoz closed 5 years ago

DiegoKoz commented 6 years ago

Similiar to this:

consider this image

From the documentation example, I change the filter_destination for some wrong name. The error message is not very clear, as there is no problem with 'distw'. I think this just happens with filter_origin and filter_destination, and could be easily solved with some internal check of this names inside the functions.

In this case, for example, I would like to have an error message like " 'CHH' is not a valid countryname"

pachadotdev commented 6 years ago

@DiegoKoz: thanks

@jbkunst: look, JOSS reviewers gave some cool feedback that will be added to this repo from now do you think we can include your messageline() tricks around informative error messages? beware github is acting funny so let's wait a bit until gh status informs otherwise