I have a executor service, where the thread runs 2-3 multiple process on the context object , and logs the state into the database, after each process is completed. Current code defines try and catch block after each logging statement , so that any database exceptions can be handled , and the worker moves to next process.
Is there a design pattern, or a more graceful way of doing this. The code has multiple try and catch blocks inside a single function which is not readable
Aucun commentaire:
Enregistrer un commentaire