Copy link
@Lastique

Lastique Nov 10, 2017

Member

I don't think this change is correct.

There is a difference between invalid arguments (e.g. a null pointer where a non-null is needed) and invalid input that was possibly obtained from external source (file, network, command line, etc.). std::invalid_argument can be used to indicate the former. In the latter case std::runtime_error or some other more specific exception would be more appropriate.

Also, this is a breaking change because invalid_argument does not derive from runtime_error. Users' code will break silently, which is even worse.

Please, revert this before 1.66 is shipped. If you want to have a special exception type for parsing errors, you can add one after the release.