It depends. And you do not have to give up one thing to have another.
For example, in an API used by a third party, you will certainly want the possible exceptional scenarios well defined and documented, so anyone who uses it can perform the treatments as best you can.
However, on a typical system, removing something that has already been removed may simply be ignored. For example, a user, using a registration screen on a web system, repeatedly clicks the "Delete" button because the internet is slow. As a result multiple requests arrive by excluding the same object. The first will have an effect and the others will show the error that the object was not found. Because the user sees only the result of the last request, he may come to the conclusion that he has a problem with the system.
In addition, if you find it appropriate, you can have a generic exception such as ErroCadastroException
that is thrown whenever an unauthorized operation is performed, such as adding a duplicate record or changing something that does not exist.
However, suppose you later see the need to include a specific validation to check if the value of a field is duplicated in order to show the user exactly what the problem is. In this case, you could specifically create an exception that extends the other and contains the error in specific. For example:
public class CpfJaExisteException extends ErroCadastroException {
...
}
In this way, you can show a friendly message to the user, for example by informing that person already has a registration or even redirecting to the registration of it.
An important point here is that you can probably use this exception in the internal routines of the system, but will treat it at some point to take the necessary action.
In summary, you should only create exceptions if you want to treat them specifically at some point, otherwise use a generic exception.
Also note that there are alternatives to exceptions . For example, if there is no data in a table, return an empty list. On the screen, you can check whether or not records are returned and display some message saying there are no records returned.