Parsing time throw a `ValueError` instead of a `ISOFormatError` when parsing garbage
Issue #18
resolved
When parsing some invalid string as time, it raise a ValueError
.
It would be nicer to return a aniso8601.exceptions.ISOFormatError
with an explication about the problem, like: ISO 8601 time must start with an integer
running:
aniso8601.parse_time("test")
throw:
ValueError: invalid literal for int() with base 10: 'te'
Comments (4)
-
repo owner -
repo owner The above are all fixed in the isobuilder branch which will eventually become 4.0.0.
-
reporter Nice, thank you!
-
repo owner - changed status to resolved
4.0.0 has been released.
- Log in to comment
There are quite a few of these types of issues that I've either stumbled across, or have been brought to my attention. The custom exception types,
ISOFormatError
especially, may not have been quite ready for prime time.Some others that should throw
ISOFormatError
: