l0b0 / vcard

vCard 3 validator, class and utility functions
https://gitlab.com/victor-engmark/vcard
GNU General Public License v3.0
34 stars 8 forks source link

Refactored VCardFormatError into subclasses #32

Closed Zearin closed 10 years ago

Zearin commented 10 years ago

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. :)

Zearin commented 10 years ago

@l0b0 Hi

Zearin commented 10 years ago

Thanks, @l0b0!