Forum Discussion

k_de_boer03's avatar
k_de_boer03
Contributor
9 years ago
Solved

Throwing exceptions in script extensions

Hi,    I am learning to write a script extension in JScript. And I can't figure out how to throw an exception in the extension, and catch it in TestComplete. For example the following code in the s...
  • joseph_michaud's avatar
    9 years ago

    There is a restriction with passing exceptions across units:

     

    In TestComplete, if a script calls an object method that is declared in another unit, and this method throws an exception, the exception cannot be caught and handled by the try {} block in the main script. Keep this in mind when developing object-oriented test scripts using native JScript functionality.

     

    mentioned in this article  Supported Scripting Languages - Specifics of Usage