def appendChild(self, node): if not node.getParent(): node.set_parent(node) self.children.append(node) try: self.data_model.changed(ChangeType.NodeInserted, self, (node,)) except Exception as e: print(e) else: e = IllegalArgumentException() e.ArgumentPosition = 0 raise e
def appendChild(self, node): if not node.getParent(): node.set_parent(node) self.children.append(node) try: self.data_model.changed(ChangeType.NodeInserted, self, (node, )) except Exception as e: print(e) else: e = IllegalArgumentException() e.ArgumentPosition = 0 raise e
def _getIllegalArgumentException(self, position, code): e = IllegalArgumentException() e.ArgumentPosition = position e.Message = getMessage(self.ctx, code) e.Context = self return e