diff --git a/include/chaiscript/utility/json_wrap.hpp b/include/chaiscript/utility/json_wrap.hpp index 7b3ef66f..ce3072c9 100644 --- a/include/chaiscript/utility/json_wrap.hpp +++ b/include/chaiscript/utility/json_wrap.hpp @@ -142,8 +142,8 @@ namespace chaiscript // not a dynamic object } - if (t_bv.is_null()) return json::JSON(); // a null value - + if (t_bv.is_null()) return json::JSON(); // a null value + throw std::runtime_error("Unknown object type to convert to JSON"); }