diff --git a/src/variant.cpp b/src/variant.cpp index 1917d7d..c6077f1 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -486,7 +486,7 @@ const string& variant::get_string()const { if( get_type() == string_type ) return **reinterpret_cast(this); - FC_THROW_EXCEPTION( bad_cast_exception, "Invalid cast from ${type} to Object" ); + FC_THROW_EXCEPTION( bad_cast_exception, "Invalid cast from type '${type}' to Object", ("type",int(get_type())) ); } @@ -495,7 +495,7 @@ const variant_object& variant::get_object()const { if( get_type() == object_type ) return **reinterpret_cast(this); - FC_THROW_EXCEPTION( bad_cast_exception, "Invalid cast from ${type} to Object" ); + FC_THROW_EXCEPTION( bad_cast_exception, "Invalid cast from type '${type}' to Object", ("type",int(get_type())) ); } void to_variant( const std::string& s, variant& v )