From 14abdade03587462060c03e0873cd2f9ca92c5b4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Mar 2021 10:44:27 -0400 Subject: [PATCH] ValueTokenizer will throw a "Not enough tokens" exception, if trying to get the next value without one present --- src/tokenizer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 2cc0de72e1..18ed64e0ac 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -200,7 +200,7 @@ std::string ValueTokenizer::next_string() { if (has_next()) { std::string value = tokens.next(); return value; - } + } throw TokenizerException("Not enough tokens",""); return ""; } @@ -216,7 +216,7 @@ int ValueTokenizer::next_int() { } int value = atoi(current.c_str()); return value; - } + } throw TokenizerException("Not enough tokens",""); return 0; } @@ -232,7 +232,7 @@ bigint ValueTokenizer::next_bigint() { } bigint value = ATOBIGINT(current.c_str()); return value; - } + } throw TokenizerException("Not enough tokens",""); return 0; } @@ -248,7 +248,7 @@ tagint ValueTokenizer::next_tagint() { } tagint value = ATOTAGINT(current.c_str()); return value; - } + } throw TokenizerException("Not enough tokens",""); return 0; } @@ -264,7 +264,7 @@ double ValueTokenizer::next_double() { } double value = atof(current.c_str()); return value; - } + } throw TokenizerException("Not enough tokens",""); return 0.0; }