+ 7
Extends Exception or RuntimeException
I am reading a code written by someone and some of its exceptions extends RuntimeException and others Exception. But I can't understand why. Is there a valid explanation (advantages or disadvantages) to choose one or the other?
1 Odpowiedź
+ 1
The advantage about creating custom exception like that is we can provide more useful information in the exception, but still
The best practice is use the provided execption if no advantages provided.