Answer the question
In order to leave comments, you need to log in
How to correctly implement the answer in the directories?
Hello.
Let's say there is a currency reference, getByCode method. What is the best practice for answers?
Should I use optional? I just met different implementations, including the use of exceptions, in the case of an entity not found.
Thank you.
Answer the question
In order to leave comments, you need to log in
Depends on the chosen programming paradigm and design approaches.
I am for Optional or @SneakyThrows.
There is no right or wrong - this is a matter of agreements on the project, as Sergey Gornostaev wrote
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question