Does Spring use any design patterns that exceptions will not be checked?
Not a design pattern, but exception handling guidelines .
Consider the code below:
public void consumeAndForgetAllExceptions(){
try {
...some code that throws exceptions
} catch (Exception ex){
ex.printStacktrace();
}
}
What is wrong with the code above?
, catch. catch . catch, .
?
public void someMethod() throws Exception{
}
; . ? Java .
, spring ?
, throw. , . , , , . , spring framework.
API
API Java ,
NullPointerException, IllegalArgumentException IllegalStateException. , Java, . .
. :