pop exception if trying to remove an item that doesn\'t exist. yay\!

This commit is contained in:
jez 2010-12-27 00:27:57 +00:00
parent 647de72862
commit 16463bbd83

View file

@ -206,7 +206,7 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT, string_adaptorT>
NodeImplT* removeNode(typename NodeListT::iterator n)
{
if(n == nodes_.end())
return 0;
throw DOM::DOMException(DOM::DOMException::NOT_FOUND_ERR);
NodeImplT* removedNode = *n;
nodes_.erase(n);
ownerDoc_->orphaned(removedNode);