mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Switched exception constants to const char * const (from const std::string) so we don't have to construct them all in every translation unit, and switched the exception class to derive from std::runtime_error (so it handles what() for us)
This commit is contained in:
@@ -112,7 +112,7 @@ namespace YAML
|
||||
str.get();
|
||||
str >> m_pDirectives->version.minor;
|
||||
if(!str || str.peek() != EOF)
|
||||
throw ParserException(token.mark, ErrorMsg::YAML_VERSION + token.params[0]);
|
||||
throw ParserException(token.mark, std::string(ErrorMsg::YAML_VERSION) + token.params[0]);
|
||||
|
||||
if(m_pDirectives->version.major > 1)
|
||||
throw ParserException(token.mark, ErrorMsg::YAML_MAJOR_VERSION);
|
||||
|
Reference in New Issue
Block a user