In my java code if the log()
method fails still want to proceed with the return of the response message, but the below code fails if the log()
fails, i just want the code to work with a response
message irrespective of log()
method fails or not.
My Code
public class MyClass
{
public MyResponse getMyResponse(MyRequest request) throws Exception
{
MyResponse response = new MyResponse();
response=Service.getRes(request);
log(request,response);
return response;
}
public void log(MyRequest request,MyResponse response)
{
Service.log(request,response);
}
}