bobfang1992 / pytomlpp

A python wrapper for tomlplusplus
https://bobfang1992.github.io/pytomlpp/pytomlpp.html
MIT License
86 stars 10 forks source link

Raise custom parsing error on invalid TOML input #11

Closed EpicWink closed 4 years ago

EpicWink commented 4 years ago

Currently, RuntimeErrors are raised. Not only are they not the most appropriate standard-library exception (usually ValueError would be used), but it's standard to raise a custom Exception for parsing errors (eg pytomlpp.ParseError or pytomlpp.DecodeError or pytomlpp.TOMLDecodeError etc)

bobfang1992 commented 4 years ago

I agree. Was thinking the same.