following Python error recovery code - adding errorNode.