change as requested

This commit is contained in:
taiyang-li 2023-03-06 12:39:02 +08:00
parent d7cb43a20b
commit 4fc1f131d3

View File

@ -556,15 +556,13 @@ namespace
Pos end = str_ref.data + str_ref.size; Pos end = str_ref.data + str_ref.size;
for (const auto & instruction : instructions) for (const auto & instruction : instructions)
{ {
// std::cout << "instruction:" << instruction.toString() << std::endl;
cur = instruction.perform(cur, end, date); cur = instruction.perform(cur, end, date);
// std::cout << "date:" << date.toString() << std::endl;
} }
// Ensure all input was consumed. // Ensure all input was consumed.
if (cur < end) if (cur < end)
throw Exception( throw Exception(
ErrorCodes::LOGICAL_ERROR, ErrorCodes::CANNOT_PARSE_TEXT,
"Invalid format input {} is malformed at {}", "Invalid format input {} is malformed at {}",
str_ref.toView(), str_ref.toView(),
std::string_view(cur, end - cur)); std::string_view(cur, end - cur));