more sophisticated cython exceptions