I found one recommendation that says that we should try to keep one try / except statement for the stream.
I have a class that implements Runnable (Java, but it really doesn't matter). It has several blocks, each of which is surrounded by its own try-catch block with logging and processing. Each block generates the same exception class.
Do you think I should expand the collection of exceptions that creates an exception for each operation, put all the blocks under one try-catch block and handle each differently? Here is an example of what I have here .
Thanks in advance.
source share