Refactored VCardFormatError into subclasses
Created by: Zearin
-
VCardFormatError
renamed toVCardError
- Error Subclasses for Names, Values, and ItemCount
Dunno what you’ll think of this one, @L0b0, but I thought some error types which describe more specific types of VCard errors would be helpful for the end-user.
The classes VCardNameError
and VCardValueError
are a nice parallel to the standard library exceptions NameError
and ValueError
(although they only inherit from VCardError
).
The class VCardItemCountError
is vaguely like the standard library IndexError
, in that both are raised when an expected number of something is out of bounds.
Finally, there’s the VCardLineError
class, whose name makes it pretty obvious what went wrong. :)