query regarding network error

  • Aanchal Gupta
    Aanchal Gupta


    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

    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().