Changes between Version 1 and Version 2 of Ticket #4083


Ignore:
Timestamp:
Mar 29, 2026, 4:37:12 PM (39 hours ago)
Author:
mLipok
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4083 – Description

    v1 v2  
    1 This issue is continuation for:
    2 https://www.autoitscript.com/trac/autoit/ticket/3167
    3 
    4 Please check this repro script:
    5 
    6 {{{#!autoit
    71Global $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", _ComErrorHandler)
    82
     
    148
    159$oFake.FakeObject = 1
    16 $oFake.FakeObject.Check2 = 1
     10ConsoleWrite($oFake.FakeObject.Check2 & @CRLF) ; _ComErrorHandler() is fired
     11$oFake.FakeObject.Check3 = 1 ; _ComErrorHandler() is not fired and AutoIt ends with "Variable must be of type "Object""
    1712
    1813Func _ComErrorHandler(ByRef $oError)
    19     #forceref $oError
    20     ConsoleWrite("! We intercepted a COM Error" & @CRLF)
     14        #forceref $oError
     15        ConsoleWrite("! We intercepted a COM Error" & @CRLF)
    2116EndFunc   ;==>_ComErrorHandler
    22 }}}
    23 
    24 
    25 Disscusion was taken on the forum here:
    26 https://www.autoitscript.com/forum/topic/213563-catching-com-errors-when-assigning-a-value-to-chained-object