From: Gunnar Beutner Date: Mon, 11 Nov 2013 08:27:01 +0000 (+0100) Subject: Fix exception in Value::ToJson(). X-Git-Tag: v0.0.4~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=893243db5faac653c63484c9fb514954ea5f84a9;p=icinga2 Fix exception in Value::ToJson(). Refs #5049 --- 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: