From 1adb9d62dd8b676914f7f9f6f6493381d72b7193 Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 17 Dec 2015 16:52:38 +0100 Subject: [PATCH] fixed #156 --- src/json.hpp | 5 +++++ src/json.hpp.re2c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/json.hpp b/src/json.hpp index fc066539..9de73ddf 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 9727e279..5cee92f4 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 + } } }