I’m building FromTreeControl (similar to BOMDesigner) recursively. And if I drop item in itself the tree is builded till debugger opens with that error Error executing code: Overflow in internal run stack.
I want to show better user message like “You can’t add this item on this node - it cause infinite loop”.
You shouldn’t just display a nicer message - you should avoid such a serious error as stack overflow. Therefore you need to add an additional to avoid infinite recursion. Just check if it isn’t the same item.