Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10498

Re: How catch synchronization errors from SUP Server

$
0
0

Hi

            Before doing synchronization you should check the credentials and network. And write your own exception handler method to display the synch error.

 

 

Example:

if

(!isNetworkAvailable())

{

closeSyncRecordForFailiure(sync, "Network connection is not available");

thrownew Exception("Network connection is not available");

}

 

closeSyncRecordForFailiure(sync, "Could not establish connection to the server");

thrownew Exception("Could not establish connection to the server");

 

for

(com.sybase.persistence.LogRecord l:logs)

{

System.

out.println(l.getComponent()+" "+l.getEntityKey()+" "+l.getMessage()+" "+l.getCode()+" "+l.getMessageId());

}

This is the example for getting logs of your application and display the exact message which you want

 

Regards

Sathiya

 

 


Viewing all articles
Browse latest Browse all 10498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>