Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
liveitupmore
- Junior Coder
- Posts: 22
- Joined: Wed Nov 16, 2005 3:58 am
- Location: Gold Coast, Australia
Post
by liveitupmore » Tue Jul 02, 2013 7:51 am
I have tried to use the error handler function without success until today.
The code I was using is
Code: Select all
Let>IGNOREERRORS=1
Let>ONERROR=MyErrorHandler
.
.
.
.
SRT>MyErrorHandler
TimeStamp>C:\UTILS\LOGS\error.log,LAST_ERROR
goto>END
END>MyErrorHandler
Label>END
The error occurs and the error handler sub routine is invoked however the sub routine reiterates itself infinite, going between timestamp and goto>end. It never does the goto.
I have fixed it with
Code: Select all
SRT>MyErrorHandler
TimeStamp>C:\UTILS\LOGS\error.log,LAST_ERROR
exit>
END>MyErrorHandler
Should the goto work? V14.0.8
Alistair
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Tue Jul 02, 2013 10:05 am
You can't jump out of a subroutine, if you do the subroutine will never end because the end of the subroutine was never reached.
-
liveitupmore
- Junior Coder
- Posts: 22
- Joined: Wed Nov 16, 2005 3:58 am
- Location: Gold Coast, Australia
Post
by liveitupmore » Fri Jul 05, 2013 6:08 am
Many thanks for the prompt reply.
I understand your comments however the documentation is a little ambiguous on the SRT subject
Alistair