Problem. The generic catch wraps any parse failure as "Failed to parse ..." and loses position; a malformed spec gives no line. The richer pointer/shape errors only fire after a successful lexical parse. (ROADMAP lists "richer error messages on bad input" as a follow-up.)
Evidence. src/Parser/SpecParser.php:104-114.
Fix. Special-case Symfony\Yaml\Exception\ParseException to surface getParsedLine()/getSnippet(); for JSON, use json_last_error_msg plus a line/column derived from the byte offset.
Done when. A malformed YAML/JSON spec error names the offending line.
Filed from a repo-wide improvement audit; every claim was adversarially verified against source.
Problem. The generic catch wraps any parse failure as "Failed to parse ..." and loses position; a malformed spec gives no line. The richer pointer/shape errors only fire after a successful lexical parse. (ROADMAP lists "richer error messages on bad input" as a follow-up.)
Evidence.
src/Parser/SpecParser.php:104-114.Fix. Special-case
Symfony\Yaml\Exception\ParseExceptionto surfacegetParsedLine()/getSnippet(); for JSON, usejson_last_error_msgplus a line/column derived from the byte offset.Done when. A malformed YAML/JSON spec error names the offending line.
Filed from a repo-wide improvement audit; every claim was adversarially verified against source.