diff --git a/src/json.hpp b/src/json.hpp index fc0665394..9de73ddf1 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6301,6 +6301,11 @@ class basic_json return ""; case token_type::end_of_input: return ""; + default: + { + // catch non-enum values + return "unknown token"; // LCOV_EXCL_LINE + } } } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 9727e2794..5cee92f4b 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -6301,6 +6301,11 @@ class basic_json return ""; case token_type::end_of_input: return ""; + default: + { + // catch non-enum values + return "unknown token"; // LCOV_EXCL_LINE + } } }