Improved definition error reporting