Improve error reporting when translating.