From 2ee69fc420330320e3348ac6826628417d91d68e Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Fri, 1 Nov 2019 13:34:15 +0900 Subject: [PATCH] fix: improve error messages about strings a bit --- toml/parser.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index f1e311e..a1c0150 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -414,7 +414,7 @@ parse_ml_basic_string(location& loc) { loc.reset(first); return err(format_underline("[error] toml::parse_ml_basic_string: " - "the next token is not a multiline string", + "the next token is not a valid multiline string", {{std::addressof(loc), "here"}})); } } @@ -454,7 +454,7 @@ parse_basic_string(location& loc) if(inner_loc.iter() == inner_loc.end()) { throw internal_error(format_underline("[error] " - "parse_ml_basic_string: unexpected end of region", + "parse_basic_string: unexpected end of region", {{std::addressof(inner_loc), "not sufficient token"}})); } quot = lex_quotation_mark::invoke(inner_loc); @@ -465,7 +465,7 @@ parse_basic_string(location& loc) { loc.reset(first); // rollback return err(format_underline("[error] toml::parse_basic_string: " - "the next token is not a string", + "the next token is not a valid string", {{std::addressof(loc), "here"}})); } } @@ -506,7 +506,7 @@ parse_ml_literal_string(location& loc) { loc.reset(first); // rollback return err(format_underline("[error] toml::parse_ml_literal_string: " - "the next token is not a multiline literal string", + "the next token is not a valid multiline literal string", {{std::addressof(loc), "here"}})); } } @@ -545,7 +545,7 @@ parse_literal_string(location& loc) { loc.reset(first); // rollback return err(format_underline("[error] toml::parse_literal_string: " - "the next token is not a literal string", + "the next token is not a valid literal string", {{std::addressof(loc), "here"}})); } }