diff options
Diffstat (limited to 'include/json.h')
-rw-r--r-- | include/json.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/json.h b/include/json.h index 7d840fa..c2ce20e 100644 --- a/include/json.h +++ b/include/json.h @@ -286,7 +286,9 @@ namespace crow case type::String: return boost::lexical_cast<int64_t>(start_, end_-start_); default: - throw std::runtime_error(strcat("expected number, got: ", get_type_str(t()))); + const std::string msg = "expected number, got: " + + std::string(get_type_str(t())); + throw std::runtime_error(msg); } #endif return boost::lexical_cast<int64_t>(start_, end_-start_); |