I'm starting a development project with a new client, they've designed a way of exception handling/logging that I don't believe is the correct. Basically in the plsql they wrap every insert/update/procedure call in a when others exception, make a call to a logging procedure, and set a continue flag=N. The next statement then has to check if the continue flag is Y, then that statement is also wrapped in when others, etc etc. I know this is wrong and want to explain the best approach.
I believe the logging (which is mandatory) only needs to happen once, in an exception block at the end of their procedures. The DML statements can have their own exception handlers (but not 'when others'), which can just raise a custom exception so the logger at the bottom knows which DML failed. When calling another procedure, the called procedure could raise a 'global' exception (defined in a package spec) so the calling proc can then catch the same exception and log it.
Is there a better approach? thanks in advance.