It actually depends on quite a few factors. First and foremost being the age of your child at which this thought crosses your mind.
Protecting or caging a child is preventing him from exploring the world and learning from it (And that includes the mistakes). A child at an young age needs to explore. That's how his wholesome development of the mind occurs.
Looking at a hypothetical example:When a child first learns to walk, he would fall. You should be there to hold him should he fall, but he needs to walk again. If you prevent him from walking, then would it serve the purpose of his learning to walk? :)
If the child is in adolescence or teenage then the situation needs to be dealt with a little more sensitively. Remember that this is the time in everyone's life when the rebel instincts actually take shape. Hence curbing their desires or their independence would only be detrimental and thus make them more determined to pursue their rebellious attitude. However timely watch over your child and effective communication, as and when it's required, are effective solutions to make sure that your child doesn't cross the line.
Mistakes would be made no matter whether the child is caged or given complete freedom. But the mantra lies in the fact of letting your child know of the mistakes and ask them the question of what they have learnt from them. It's the parents duty to inform the child of the consequences of their mistakes.