diff pyink/domview.py @ 1269:97302d2a0a1d

Raise an error for the error. - Never silent fault - If it is fault, it should be fault. - Don't make fault silent. - fix the fault. - the ID should be in the map, but it is not. It is really a fault.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 12 Jan 2011 20:59:38 +0800
parents ca301f6abef7
children ef1f16beef21
line wrap: on
line diff
--- a/pyink/domview.py	Wed Jan 12 20:52:34 2011 +0800
+++ b/pyink/domview.py	Wed Jan 12 20:59:38 2011 +0800
@@ -104,7 +104,8 @@
 	    pass
 	else:
 	    if child_id not in self._id2node:
-	        return
+                raise ValueError, \
+                    'remove a node that is never known (%s)' % (child_id)
 	    del self._id2node[child_id]
 	    pass