Feature Description
Given that Decanter is mostly used in controllers, I think it would be a nice idea that an exception that could be raised when a bad date is passed, raises a custom Decanter Exception instead of Date::Error. I think it will help with:
- If In the future there are more parsers with format options, all the possible errors could be represented in the same exception
- Given the previous point, handling formatting errors could be simplify by handling the custom exception and not having to handle each specific case.
Suggested Solution
Probably instead of simply returning Date::Error, we could return Decanter::ValueFormatError or something similar.