Implement exception hierarchy.
Merge pull request #5 from spotify/udoprog/exception-hierarchy

I agree that this is a sensible change. I have some suggestions for further improvement cooking in my head, but those can definitely wait. Merging