Received feedback today from James S on my latest Oracle Magazine article, Planning for Trouble . I will respond here (there is no mechanism for comments/discussion at the Oracle Magazine page). If you haven't yet read it, I suggest you do so before proceeding with this post. Comment 1. This is regarding exception handling. Let’s say the client calls procedure A, and A calls B, B calls C. Are you suggesting we add a “When others” + error logging logic in each level? Does it mean one error will be logged three times? (because it is captured and re-raised each time). Good point, James. I make the argument in the article that you should trap the exception as close as possible to where it was raised, so that you can log the values of local variables that may help you diagnose the problem. [Here's reinforcement of that point (and other great points about doing effective execution tracing) - they call it contextual logging: http://www.stack...
For the last twenty years, I have managed to transform an obsession with PL/SQL into a paying job. How cool is that?