Actions
Bug #3224
closedThrown errors from com instances are not caught by AdiIRC
Start date:
01/22/2017
Due date:
% Done:
0%
Estimated time:
Operative System:
All
Regression:
No
Description
AdiIRC does not properly catch errors raised by com instances, thus resulting in com instances own error handling taking place
alias example {
var %error
var %inputJS = (function(){example=function(){throw new Error("WHY YOU NO CATCH THIS?")}})()
var %execjs = example()
;; open a com
comopen example MSScriptControl.ScriptControl
if ($comerror) {
%Error = Failed to create an instance of ScriptControl
}
elseif (!$com(example, language, 4, bstr, jscript) || $comerr) {
%Error = Failed to set language
}
elseif (!$com(example, ExecuteStatement, 1, bstr, %inputjs) || $comerr) {
%Error = Failed to load js
}
;; AdiIRC SHOULD catch this error but it does not; instead the com's own error handling takes place
;; resulting in a popup box appearing. This is not the case for mIRC
else {
noop $com(example, eval, 1, bstr, %execjs)
}
:error
if ($com(example)) comclose $v1
}
Actions