Add more specific exception types to the dynamic system and handle them properly

This commit is contained in:
Jason Turner
2009-06-25 00:03:23 +00:00
parent d8b5847ff6
commit eb5dbe4975
4 changed files with 75 additions and 38 deletions

View File

@@ -351,27 +351,6 @@ namespace dispatchkit
}
class bad_boxed_value_cast : public std::bad_cast
{
public:
bad_boxed_value_cast(const std::string &val) throw()
: m_val(val)
{
}
virtual ~bad_boxed_value_cast() throw()
{
}
virtual const char * what() const throw()
{
return m_val.c_str();
}
private:
std::string m_val;
};
//Built in to_string operator
@@ -420,7 +399,7 @@ namespace dispatchkit
{
return (lhs.assign(rhs));
} else {
throw bad_boxed_value_cast("boxed_value has a set type alread");
throw bad_boxed_cast("boxed_value has a set type already");
}
}