changeset 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 cd848c2ec29f
children ef1f16beef21
files pyink/domview.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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