We have an embedded solution utilising macroscript dll from within which we run our scripts.
The problem we have is the default handling of exceptions (eg. SetFocus when a window doesn't exist) is to popup a dialog with the error string and wait for the user to respond to the Cancel/OK options.
We would like to capture the error (don't want to ignore it), but dont' want it to stop execution waiting for user input (which won't come as our automation is not human assisted).
Is there a way to handle these errors in the script, or ideally (I'll raise through a separate feature request if not possible) to have a callback from the macroscript DLL to allow for programmatic handling of the error situation.
Exception handling when running scripts via RunCode
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Exception handling when running scripts via RunCode
Yes, you can ignore errors or use your own custom error handlers. Please see "Error Handling" in the command reference:
https://www.mjtnet.com/manual/index.htm ... ndling.htm
https://www.mjtnet.com/manual/index.htm ... ndling.htm
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Exception handling when running scripts via RunCode
Thanks marcus I will look into the handler... Just as an aside when I followed the link I got the following error from the site:
Site error: the file /var/www/vhosts/cloud.mjtnet.com/mjtnet.com/comments/init-settings.php requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.
Not sure if that's an issue on my side..
Site error: the file /var/www/vhosts/cloud.mjtnet.com/mjtnet.com/comments/init-settings.php requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.
Not sure if that's an issue on my side..
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Exception handling when running scripts via RunCode
Sorry about that. This is now fixed. Page should load fine now.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?