scriptkitty Posted May 28, 2005 Share Posted May 28, 2005 Any chance of capturing the error when a COM/OBJ call fails instead of crashing the script?An AutoIt script will immediately stop execution when it detects a COM error. This is the default and also the safest setting. In this case you have to take measures in your script to prevent the error from happening.Only if there is no way to prevent a COM error, you could install an "Error Handler" in which you take action after the error has happened.I was just thinking that an option might be a good thing as well.OBJErrorsFatal Sets if the script should terminate with a fatal error if a Obj/COM function fails due ObjEvent error:1 = fatal error (default)0 = silent error (@error set to 1)Not really needed since you can put in a COM Error Handling function, but was just a thought.I am really enjoying this new feature. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
SvenP Posted May 28, 2005 Share Posted May 28, 2005 Any chance of capturing the error when a COM/OBJ call fails instead of crashing the script?I was just thinking that an option might be a good thing as well.Not really needed since you can put in a COM Error Handling function, but was just a thought.I am really enjoying this new feature.<{POST_SNAPBACK}>Hello scriptkitty,You have answered your own question :-) The 'COM Error Handler' is indeed required to 'catch' COM/OBJ errors. It works the same way as 'regular' COM Event functions, so that's why I incorporated into ObjEvent and not in a separate 'AutoIt Option'.Regards,-Sven Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now