question

bmcmanus avatar image
bmcmanus asked ericnute edited

TCL eval error event

How can I ignore an error using Events with a TCL eval step - I get "Unable to evaluate "set servicepack [query Portal_Response2 Service_Pack($phone)]" : Invalid query : Incorrect number of arguments" when $phone is NULL.
iTesttcl scripterror message
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yaseen avatar image
Yaseen answered
You would probably modify the OnTclInterpreterError event under the Step properties > Events. Just uncheck the Inherit option, and delete the steps under that. Hope this helps!
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mallikarjunarao avatar image
mallikarjunarao answered mallikarjunarao edited
For we don't have any event you could use info exists command before using your logic e.g. info exists servicePack For more information on info command http://www2.tcl.tk/1185 I hope this could help you.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

udaya avatar image
udaya answered
The events are just like a try catch block execution, so the scenario is we can ignore the error messgae if we are aware of the error or warning events (agree to Yaseen). When you see this message, the "servicepack" variable NOT set at all as the statemet NOT being executed. So the better situation is if you execute the statement only when $phone is NOT NULL or $phone exists (as per your situation).
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.