java - Catch SocketTimeOutException In cxf Jaxrsclient -


i making rest call using apache cxf . able set timeout during invoking service , corresponding socketconnection timeout exception gets thrown not able catch exception , set user definied exception. please find below code time out exception

try{     httpclientpolicy clientconfig = webclient.getconfig(service).gethttpconduit().getclient(); clientconfig.setreceivetimeout(10000);}  catch(sockettimeoutexception e) {           logger.error("");          customexception....     } 

exception gets thrown without going inside catch block. tell me how can catch exception?

try write

catch(exception e) {       logger.error("");      customexception.... } 

instead of code. can catch exception , handle it.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -