Jump to content
vick

handle error in TE

Recommended Posts

vick

Hi , 

I have script like below:

in loop i have for example

$a =_IEGETOBJBYID(....)

$b =_IEGETOBJBYID(....)

$c=_IEGETOBJBYID(....)

if i want to handle error , i need to write If @error then statement after every object or i can write only one after all so any object fail , it handle error like below:

 

if  $x=$y then 

$a =_IEGETOBJBYID(....)

$b =_IEGETOBJBYID(....)

$c=_IEGETOBJBYID(....)

elseif @error then 

do something

endif

 

Share this post


Link to post
Share on other sites
vick

thanks but instead of using @error for each call, how we can use once only ?

Share this post


Link to post
Share on other sites
Danp2

Sorry, but you request isn't making sense. If you want to know whether each call to _IEGetObjById succeeded or failed, you will either need to save the @error value after each call or I guess you could use IsObj() to test each of the resulting variables.

Share this post


Link to post
Share on other sites
vick

got it.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×