jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.77k forks source link

Add more hits to the error "Error msg: bad conversion" #1274

Open MMarcus95 opened 3 months ago

MMarcus95 commented 3 months ago

Hello,

when I try to parse an empty yaml file I got the error "Error msg: bad conversion".

Could this error message be improved a bit?

For example, if I try to get a key that is not in the yaml file, the error message could say that the key is not in the file. Also, specifying that the error comes from yaml-cpp (e.g _"Error msg: bad conversion when parsing .yaml"_) can be very helpful because you can easily understand from where the issue comes from. In particular when using yaml-cpp inside a big software architecture.

Thanks!

cxwx commented 1 month ago

same requirement.