Publidata / opening_hours_converter

OpenStreetMap Opening Hours to Date & Date to Opening Hours
https://rubygems.org/gems/opening_hours_converter
GNU Affero General Public License v3.0
12 stars 3 forks source link

Feature/errors #45

Closed berkes closed 4 years ago

berkes commented 4 years ago

This introduces some specific errors: ArgumentError and OpeningHoursConverter::ParseError

The latter can be used by callers and users of the lib to catch.

Currently we cannot catch errors in a nice and clean way; and parsing often goes wrong: there's loads of edgecases, not yet implemented features, or simply broken open_hours in OSM which will cause the parser to break now.

Allowing upstream to catch those makes the lib easier to use.