Is there any way I read exception from below method and pass it to other method for track. Response of catch block is different from exception.
Either adding some annotation or spring AOP or any other way.
public void function(){
try{
method();
}
catch(Exception e){
return response;
}
}