Tippex

The requested action with this object has failed

2 posts in this topic

Sometimes my scripts crash with a console error such as this one:

"C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1599) : ==> The requested action with this object has failed.:
Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText)
Return SetError($_IESTATUS_Success, 0, $oObject.document.body^ ERROR
->11:13:08 AutoIt3.exe ended.rc:1

 

However, before crashing I get a number these warnings that I suspect are related:

--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
 

The "object has failed" errors are coming from included file "IE.au3" which is version 3.3.14.2 according to the top part of its header:

 

; #INDEX# =======================================================================================================================
; Title .........: Internet Explorer Automation UDF Library for AutoIt3
; AutoIt Version : 3.3.14.2

An example of where a function crashes out is as below; the final Return statement is followed by "==> The requested action with this object has failed.:"

; #FUNCTION# ====================================================================================================================
; Author ........: Dale Hohm
; ===============================================================================================================================
Func _IEBodyReadText(ByRef $oObject)
    If Not IsObj($oObject) Then
        __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidDataType")
        Return SetError($_IESTATUS_InvalidDataType, 1, 0)
    EndIf
    If Not __IEIsObjType($oObject, "browserdom") Then
        __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidObjectType", "Expected document element")
        Return SetError($_IESTATUS_InvalidObjectType, 1, 0)
    EndIf
    ;
    Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText)
EndFunc   ;==>_IEBodyReadText

 

Searching AutoIT help documentation, I read:

"_IEErrorHandlerRegister() has been removed. It's not required due to COM errors no longer being fatal. "

Any advice please on how I may go about making the failing objects not fatal and how I can overcome the __IEIsObjType warnings if  _IEErrorHandlerRegister() has been removed?

Thanks.

 

 

 

 

 

Share this post


Link to post
Share on other sites



I've recently discovered that just adding _IEErrorHandlerRegister() at the beginning part of my script suppresses the  __IEIsObjType warnings

but does anyone know if it will stop script/com error handling outside of the IE functions, please, as I think there can only be one error hander?

ObjEvent("AutoIt.Error", "ErrFunc")

 

Share this post


Link to post
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