namespace json_spirit\r
{\r
enum Value_type{ obj_type, array_type, str_type, bool_type, int_type, real_type, null_type };\r
+ static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"};\r
\r
template< class Config > // Config determines whether the value uses std::string or std::wstring and\r
// whether JSON Objects are represented as vectors or maps\r
{\r
std::ostringstream os;\r
\r
- os << "value type is " << type() << " not " << vtype;\r
+ /// satoshi: tell the types by name instead of by number\r
+ os << "value is type " << Value_type_name[type()] << ", expected " << Value_type_name[vtype];\r
\r
throw std::runtime_error( os.str() );\r
}\r