Improved error reporting for parse failures