This is not Hypothetical at all !
Usually I find the problem, but it takes much time since the framework cannot tell me the exact location of the error.
The problem is getting worse when someone who dosn't familiar with the code has to debug it.
I read the 'carp' set of modules. I don't see how it can help to solve this difficulty.