query regarding network error

Help
2010-04-20
2013-02-18
  • Aanchal Gupta
    Aanchal Gupta
    2010-04-20

    Hi,

    When I use the following for executing the test-script,
    *creating an application support object
    *getting automated runnable
    *running the test

    Sometimes, there is this Network Error: no route to server: <IP Address>
    So, i want to catch this as an exception or an event so that I can do some processing whenever this happens!!

    Is there any way that i can do this?

     
  • Robert Pes
    Robert Pes
    2010-04-27

    Have your script connect through the connect() method rather than passing the server name and password through the runnable arguments. This will allow you to test return value of the method (anything else than zero indicates failure). The eventual connection error is then available through the context method getConnectionThrowable().