Forum Discussion

torus's avatar
torus
Contributor
2 years ago
Solved

javascript try/catch block

I thought try/catch blocks were supposed to help you avoid failures/exceptions. That is how they work in C# and from my understanding, this is how thye work in Javascript. Why is the below code still...
  • rraghvani's avatar
    2 years ago

    See Process Method - "The Process method returns a Process object by its application name and index. If the process is not found, the method returns an empty object and posts the message “The process … was not found” to the test log". Majority of the methods in TC are like this i.e. returns object or null.

     

    An empty object doesn't throw an exception.