I have a method in my application service that receives the id of an entity:
Document doStuff(Long documentId);
In my method I'm checking that the id passed match an entity stored previously, if not it throws an exception.
Now, my doubt is, is this com.application.exceptions.DocumentNotFoundException
a RuntimeException
or an Exception
?
Should the Service
force who use it to manage the case the id is wrong, or is it implicit?