From 6fddec0dd3eca218b925d4c2bc5bf207be324d62 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 20 Dec 2014 09:17:02 +0100 Subject: [PATCH] Improve error message for invalid field accesses fixes #8079 --- lib/base/value.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/value.hpp b/lib/base/value.hpp index 0e3a6123a..bb68acd4b 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -139,7 +139,7 @@ public: return intrusive_ptr(); if (!IsObject()) - BOOST_THROW_EXCEPTION(std::runtime_error("Cannot convert value to object.")); + BOOST_THROW_EXCEPTION(std::runtime_error("Cannot convert value of type '" + GetTypeName() + "' to an object.")); Object::Ptr object = boost::get(m_Value);