diff -r a5f58ca4629b -r 29bc2bebf1d4 ConfigTreeNode.py --- a/ConfigTreeNode.py Sat Feb 04 07:19:52 2023 +0800 +++ b/ConfigTreeNode.py Mon Feb 06 20:07:51 2023 +0800 @@ -558,9 +558,12 @@ ChildrenWithSameClass = self.Children.setdefault(CTNType, list()) # Check count if getattr(CTNClass, "CTNMaxCount", None) and len(ChildrenWithSameClass) >= CTNClass.CTNMaxCount: - raise Exception( - _("Max count ({a1}) reached for this confnode of type {a2} "). - format(a1=CTNClass.CTNMaxCount, a2=CTNType)) + + msg = _("Max count ({a1}) reached for this confnode of type {a2} ").format( + a1=CTNClass.CTNMaxCount, a2=CTNType) + self.GetCTRoot().logger.write_warning(msg) + + return None # create the final class, derived of provided confnode and template class FinalCTNClass(CTNClass, ConfigTreeNode):