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

Added exceptions and exception handling #18

Open
aaron97neu opened this issue Nov 16, 2018 · 1 comment
Open

Added exceptions and exception handling #18

aaron97neu opened this issue Nov 16, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@aaron97neu
Copy link
Member

In many languages, Python allows for throwing and catching exceptions (as well as defining your own). Implementing this into LIMO would be extremely useful to allow for better debugging for the end user. Since we are teaching beginning programmers, the ability to immediately halt the program and display a relevant and informative message about what they did wrong (in the code example from #17, something like "Direction was not valid. must be a bearing in degrees, or N/S/E/W or Left/Right") would help them fix their programs much faster, as well as avoid the convoluted method of returning invalid ("-1" or "null") values and hoping the calling method responds appropriately

@aaron97neu aaron97neu added the enhancement New feature or request label Nov 16, 2018
@aaron97neu
Copy link
Member Author

It appears that on get_road_names(), geocode_intersection(), and geocode_address() all raise one exception each. This implies someone at some point in time started this. This might be a good starting point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant