#4083 new Bug

COM Error Handler - not always fires event - when assigning values — at Version 3

Reported by: mLipok Owned by:
Milestone: Component: AutoIt
Version: 3.3.18.0 Severity: None
Keywords: Cc:

Description (last modified by mLipok)

This issue is continuation for:
https://www.autoitscript.com/trac/autoit/ticket/3167
Please check this repro script:

Global $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", _ComErrorHandler)

Global $oFake[]
Global $oTestObject[]

$oFake.TestObject = $oTestObject
$oFake.TestObject.Check1 = 1

$oFake.FakeObject = 1

ConsoleWrite($oFake.FakeObject.Check2 & @CRLF) ; _ComErrorHandler() is fired as this was already fixed in https://www.autoitscript.com/trac/autoit/ticket/3167

$oFake.FakeObject.Check3 = 1 ; _ComErrorHandler() is not fired and AutoIt ends with "Variable must be of type "Object""

Func _ComErrorHandler(ByRef $oError)
        #forceref $oError
        ConsoleWrite("! We intercepted a COM Error" & @CRLF)
EndFunc   ;==>_ComErrorHandler

Disscusion was taken on the forum here:
https://www.autoitscript.com/forum/topic/213563-catching-com-errors-when-assigning-a-value-to-chained-object

ps.
sorry for so many edits.

Change History (3)

comment:1 by mLipok, on Mar 29, 2026 at 4:34:45 PM

Description: modified (diff)

comment:2 by mLipok, on Mar 29, 2026 at 4:37:12 PM

Description: modified (diff)

comment:3 by mLipok, on Mar 29, 2026 at 4:41:26 PM

Description: modified (diff)
Note: See TracTickets for help on using tickets.