Towards better exceptions...

A small step towards fixing #44.