Relationship between Exceptions Defined in and Messages Sent To the Result File

Silk Test Classic calls LogError automatically when it raises an exception that you have not handled. By reading you can find that Silk Test Classic has a list of exceptions like:

E_ABORT = -10100,
E_TBL_HAS_NO_ROW_HDR = -30100,

Since exception numbers can apply to more than one exception, it can be helpful to query on a particular exception number via ExceptNum() to decide how to handle an error. If you need to query on a specific exception message, you can use ExceptData(). We recommend using MatchStr() with ExceptData().

To find the E_... constant for any 4Test exception, you can use:

[-] do
    <code that causes exception>
[-] except
[ ] LogWarning ("Exception number: {[EXCEPTION]ExceptNum ()}") 
[ ] reraise

This will print out the exception constant in the warning.

Be sure to remove the LogWarning do..except block after you have found the E_... constant.