My system has 2 main layers, the service layer and the database access layer.
I expose an interface to the service layer for the database operations.
Now, in this interface there are a few exceptions that can get thrown by every operation of the DAO layer for example, timeout exceptions etc-
Is there a way to express this specification other than explicitly specifying for every method with
There are various a lot of options here; but I think my "opinion" somehow matches up with the "best practices" that you will find in many places by now: