Closed GoogleCodeExporter closed 8 years ago
I think some of this may work. For example, I like the "node is a map, not a
sequence" type error, and even "sequence has only 2 entries, index 3 is
invalid". However, giving the path may not work, for a couple of reasons:
1. The key might be a long scalar with characters that we don't really want to
print (e.g., newlines)
2. The key might be a complex data type itself, e.g.:
[1, 2]: [3, 4]
Original comment by jbe...@gmail.com
on 3 May 2011 at 10:01
At the very least, line / column information pertaining to the badly casted
value would be *EXTREMELY* helpful. I perused the source a tiny bit, and don't
really understand why each Node doesn't just get a Mark indicating where that
node begins. This Mark could then be used for the error messages rather than
0, 0. That would be very helpful and save a lot of time.
Original comment by woodswal...@gmail.com
on 10 Jun 2014 at 11:11
Amendment after playing around with it more - you really need the whole key.
As Joachim points out, when only one asked-for key does not exist, and it's
buried in a nest of functions, it is very difficult to find out why your
program is crashing even though the fix is usually ridiculously simple (add
that key to your yaml).
Original comment by woodswal...@gmail.com
on 11 Jun 2014 at 12:11
Issue 238 has been merged into this issue.
Original comment by jbe...@gmail.com
on 24 Jan 2015 at 10:32
This issue has moved to github: https://github.com/jbeder/yaml-cpp/issues/104
Original comment by jbe...@gmail.com
on 30 Mar 2015 at 1:23
Original issue reported on code.google.com by
Joachim....@gmail.com
on 1 May 2011 at 8:26