From 893243db5faac653c63484c9fb514954ea5f84a9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 11 Nov 2013 09:27:01 +0100 Subject: [PATCH] Fix exception in Value::ToJson(). Refs #5049 --- lib/base/value.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/base/value.cpp b/lib/base/value.cpp index 5a6bfa9ea..4bdefde52 100644 --- a/lib/base/value.cpp +++ b/lib/base/value.cpp @@ -174,10 +174,8 @@ cJSON *Value::ToJson(void) const } else if (IsObjectType()) { Array::Ptr array = *this; return array->ToJson(); - } else if (IsEmpty()) { - return cJSON_CreateNull(); } else { - BOOST_THROW_EXCEPTION(std::runtime_error("Unknown object type.")); + return cJSON_CreateNull(); } case ValueEmpty: -- 2.40.0