Classes defined using define-automation-component allow extended error information to be returned for all Automation methods. Within the body of a define-com-method definition, the function set-error-info can be called to describe the error. In addition, this function returns the value of
DISP_E_EXCEPTION
, which can be returned directly as the hresult from the method.
(define-com-method (i-test-suite-1 fx)
((this c-test-suite-1))
(print "in fx")
(set-error-info :description "foo"
:iid 'i-test-suite-1
:source "fx"))