Catch block not getting executed in java ExecutorService threads
We want to execute a task asynchronously through a fixed thread pool. If there are any exceptions in the task we want to update the status in the database as FAILED. We have observed that the catch block sometimes never gets executed, hence the status always remains PENDING.