I have a service that I use to ping a JDBC adapter, to see if it is available for use. When the ping fails (because the database is down), multiple error messages are written to the error log, one for each service in the call stack up to my TRY…CATCH level.
I have no desire to add TRY…CATCH…IF SUCCESSFUL THEN… constructs in every service, because that creates the sort of messy code that exceptions were designed to eliminate.
- How can I prevent the redundant messages from cluttering the error log?
- Can I prevent ALL the messages, for situations like this one where I am choosing to manage the errors myself?