graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 273 forks source link

Input problem should not result in program error #93

Closed karussell closed 7 years ago

karussell commented 7 years ago

An IllegalStateException or 'pure' RuntimeException should only be thrown for actual bugs. For the following two situations I would prefer IllegalArgumentExceptions (http code=BAD REQUEST). Are there counter arguments?

IllegalStateException: No edge matches found for path. Too short? Sequence size 3
RuntimeException: Sequence is broken for submitted track at time step 29 (84 points). Too long distance to previous measurement? 4067m