Enhance and correct error messages

This commit is contained in:
Jason Turner
2011-09-25 16:46:05 -06:00
parent 3329732ceb
commit 702b5fdba1
5 changed files with 137 additions and 40 deletions

View File

@@ -688,10 +688,9 @@ namespace chaiscript
/**
* Dump object info to stdout
*/
void dump_object(Boxed_Value o) const
void dump_object(const Boxed_Value &o) const
{
Type_Info ti = o.get_type_info();
std::cout << (ti.is_const()?"const ":"") << get_type_name(ti) << std::endl;
std::cout << (o.is_const()?"const ":"") << type_name(o) << std::endl;
}
/**
@@ -783,7 +782,7 @@ namespace chaiscript
return false;
}
std::string type_name(Boxed_Value obj) const
std::string type_name(const Boxed_Value &obj) const
{
return get_type_name(obj.get_type_info());
}