

15:34, EET

October 21, 2014

Hi,
I am trying to start the client application without having a connection to the OPC Server. It giives ConnectException but I am unable to catch this exception and exit gracefully by giving warning.
com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://LAPTOP-RLSQD170:4096/iaopcua/None ServiceResult=Bad_ConnectionRejected (0x80AC0000) “Could not establish a network connection to remote server.”
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_ConnectionRejected (code=0x80AC0000, description=”2158755840, LAPTOP-RLSQD170″)
I added the exceptions ConnectException and ServiceResultException in the initialize method in sampleClinet and my try catch block in my calling method but it gives syntax error for the ConnectException try block!
How to capture this error (no server connected).
PRAMANJ
1 Guest(s)
