While trying to debug a "bad variable type" being set while calling some IE routines, I notice that almost all calls to SetError are actually done as a "Return SetError" but I also found a few spots where an error is set but not returned and on the next return statement, it is returned as a success. Around line 1095:
Case 0
If Not $bIsMultiple Then
__IEConsoleWriteError("Error", "_IEFormElementOptionSelect", "$_IESTATUS_InvalidValue", _
"$iSelect=0 only valid for type=select multiple")
SetError($_IESTATUS_InvalidValue, 3)
EndIf
If $oItem.selected Then
$oItem.selected = False
If $iFireEvent Then
$oObject.fireEvent("onChange")
$oObject.fireEvent("OnClick")
EndIf
EndIf
Return SetError($_IESTATUS_Success, 0, 1)
Case 1
Notice the first SetError is not part of a return so it will infact return as a Success.
This is also at line 1136 and 1177.