Commit d108f600 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

get rid of some exception throwing


git-svn-id: https://svn.forked.de/graph-tool/trunk@35 d4600afd-f417-0410-95de-beed9576f240
parent c8506c63
......@@ -106,11 +106,10 @@ public:
template <class Type>
void operator()(Type)
{
try
{
_parent._retval = python::object(any_cast<Type>(const_cast<dynamic_property_map&>(_parent._dmap).get(_parent._e)));
}
catch (bad_any_cast){}
any any_val = const_cast<dynamic_property_map&>(_parent._dmap).get(_parent._e);
Type* value = any_cast<Type>(&any_val);
if (value != 0)
_parent._retval = python::object(*value);
}
get_value& _parent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment