l0b0/vcard — pull request #32 by Zearin (2014-03-12 17:02:30+00:00)
Title: Refactored VCardFormatError into subclasses

- VCardFormatError renamed to VCardError
- 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. :)