Define a few exceptions (ticket #17).

A later commit begins to use them.