Project

General

Profile

Bug #3224

Thrown errors from com instances are not caught by AdiIRC

Added by S Reject over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
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
}

History

#1

Updated by Per Amundsen over 2 years ago

The com call does not throw an exception to AdiIRC, I have no solution for this.

#2

Updated by Per Amundsen over 2 years ago

  • Category set to Scripting
  • Status changed from New to Closed
  • Assignee set to Per Amundsen

Conclusion is it only happens with 64 bit AdiIRC, the exception is not caught using the Tablacus Script Control which is required for MSScriptControl.ScriptControl on 64 bit programs.

S Reject's bug report about the issue: https://github.com/tablacus/TablacusScriptControl/issues/2

Closing here :>

Also available in: Atom PDF