template<typename die_type, typename arg_type>
inline void set (const die_type &die, arg_type &arg)
{
- try
- {
- _m_tag = die.tag ();
- attributes_type t_attrs (die.attributes (), arg);
- _m_attributes.swap (t_attrs);
- children_type t_children (die.children (), arg);
- _m_children.swap (t_children);
- }
- catch (...)
- {
- // Never leave a partially-formed DIE.
- _m_tag = -1;
- _m_attributes.clear ();
- _m_children.clear ();
- throw;
- };
+ _m_tag = die.tag ();
+ attributes_type t_attrs (die.attributes (), arg);
+ _m_attributes.swap (t_attrs);
+ children_type t_children (die.children (), arg);
+ _m_children.swap (t_children);
}
public:
assert (_m_in->_m_pending == NULL);
_m_in->_m_pending = _m_out;
- try
- {
- // This calls add_reference for each pending reference.
- _m_out->_m_attributes.set (in.attributes (), *this);
+ // This calls add_reference for each pending reference.
+ _m_out->_m_attributes.set (in.attributes (), *this);
- for (input_die_ptr i = in.children ().begin ();
- i != in.children ().end ();
- ++i)
- add_child (*i);
- }
- catch (...)
- {
- _m_in->_m_pending = NULL;
- throw;
- }
+ for (input_die_ptr i = in.children ().begin ();
+ i != in.children ().end ();
+ ++i)
+ add_child (*i);
_m_out = NULL;
_m_in->defined_self (_m_copier);