add message to all exceptions.

also, ensure that cdef functions can raise exceptions.