Jump to content

Error Handling Issue


 Share

Recommended Posts

Hello,
Hopefully this is a simple answer to what should be a simple question. I have a lot more code to this program, but all I am trying to do is use some error handling for _IETagNameAllGetCollection. If I try whats below, the function error still gets thrown and the program crashes. I cant figure out any other way to try and grab the error.

Ultimately what I want to test is whether or not $oElement is of type Object. My program must be run as Admin, if not, $oElement won't be an Object which causes the crash.

 

For $oElement in $oElements
                  If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Admin Error", "This program will now close. Please right click and run as Admin." & @CRLF & "@error = " & @error)
                  Next

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...