ignore the error and keep runing code

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
mansbubu
Posts: 35
Joined: Sun Sep 28, 2008 1:27 am

ignore the error and keep runing code

Post by mansbubu » Sun Sep 28, 2008 1:36 am

Sometime the iMacros display

RuntimeError: element ........................ was not found, line 22

could let iMacros ignore the error when NOT finding element and keep running the code ?
cause sometimes this error is a necessary step in my task, but I do not want it be stop...

thanks very much <(_ _)>
mansbubu
Posts: 35
Joined: Sun Sep 28, 2008 1:27 am

Re: ignore the error and keep runing code

Post by mansbubu » Sun Sep 28, 2008 1:45 am

oh I got it

SET !ERRORIGNORE YES

:D
trinitrotoluen
Posts: 12
Joined: Fri Nov 28, 2008 6:46 pm

Re: ignore the error and keep runing code

Post by trinitrotoluen » Sat Nov 29, 2008 4:44 pm

Can you also ignore the page loading and keep running code ?
I'm having trouble with it :|
lpitts01
Posts: 1
Joined: Wed Sep 30, 2009 5:38 pm

Re: ignore the error and keep runing code

Post by lpitts01 » Tue Oct 20, 2009 11:48 pm

I am new to this and think this is what I need to do to get through some of the errors popping on my forms as well, but where do you go to set it to "ignore the error"? Can't quite seem to navigate anywhere to find this out.
frankhack1
Posts: 75
Joined: Fri Mar 20, 2009 9:12 pm

Re: ignore the error and keep runing code

Post by frankhack1 » Sat Nov 07, 2009 11:15 pm

lpitts01 wrote:I am new to this and think this is what I need to do to get through some of the errors popping on my forms as well, but where do you go to set it to "ignore the error"? Can't quite seem to navigate anywhere to find this out.
On the script imacros create, you right click on it and on the display menu click on "Edit", then when it pop up the script editor just go to the very first line of the code and type "SET !ERRORIGNORE YES" and ready! Save the code, close it and run it.

Cheers

frankhack1
Pacerier
Posts: 3
Joined: Fri Mar 19, 2010 1:28 am

Re: ignore the error and keep runing code

Post by Pacerier » Fri Mar 19, 2010 7:25 am

is there a "repeat until success" recovery option instead of just ignoring i need the step to work. if it fails (maybe my internet down) kepe trying until it works.
PsychedeliX
Posts: 60
Joined: Sat Feb 28, 2009 2:16 pm

Re: ignore the error and keep runing code

Post by PsychedeliX » Fri Mar 19, 2010 11:52 am

trinitrotoluen wrote:Can you also ignore the page loading and keep running code ?
I'm having trouble with it :|
SET !Timeout 10
so your macro waits 10 Seconds before it execute the next line
PsychedeliX
Posts: 60
Joined: Sat Feb 28, 2009 2:16 pm

Re: ignore the error and keep runing code

Post by PsychedeliX » Fri Mar 19, 2010 11:55 am

lpitts01 wrote:I am new to this and think this is what I need to do to get through some of the errors popping on my forms as well, but where do you go to set it to "ignore the error"? Can't quite seem to navigate anywhere to find this out.
You can set this where you want, e.g.

Code: Select all

SET !ERRORIGNORE YES
'... some code ...
SET !ERRORIGNORE NO
ore just at the beginning of your macro, then the complete macro runs without stopping on an error

Code: Select all

SET !ERRORIGNORE YES
'... some code ...
'end of macro
Post Reply