I know that during parsing, yaml-cpp can throw an exception that has nice file location (line and column number) information for where the exception occurred. How about post-parse? Is there any mechanism to determine the (first) line number of a YAML file that is associated with a given node?
Asked
Active
Viewed 839 times
2 Answers
5
Starting with 0.5.3 YAML::Node has a property Mark() to get information about line number etc.

Simon Schmeißer
- 324
- 4
- 12
-1
No, there isn't, but this is an open feature request - see the issue on the project page.

Jesse Beder
- 33,081
- 21
- 109
- 146
-
This is obsolete and no longer correct. There is the Mark() method on the node. – Audrius Meškauskas Nov 18 '21 at 09:15