NextPrevUpTopContentsIndex

set-error-info

Function
Summary

Sets the error information for the current Automation method.

Package

com

Signature

set-error-info &key iid source description help-file help-context
=> error-code

Arguments

iid

The iid of the interface that defined the error, or nil if none. The iid can be a symbol naming the interface or a refguid foreign pointer.

source

A string giving the ProgID for the class that raised the error, or nil if none.

description

A string giving the textual description of the error, or nil if none.

help-file

A string giving the path of the help file that describes the error, or nil if none.

help-context

An integer giving the help context id for the error, or nil if none.

Values

error-code

The error code DISP_E_EXCEPTION or nil if the error info could not be set.

Description

The function set-error-info allows the various components of the error information to be set for the current Automation method. It should only be called within the dynamic scope of the body of a define-com-method definition. The value DISP_E_EXCEPTION can be returned as the hresult of the method to indicate failure.

Examples
(define-com-method (i-robot rotate) 
    ((this i-robot-impl)
     (axis :in)
     (angle-delta :in))
  (let ((joint (find-joint axis)))
    (if joint
        (progn
          (rotate-joint joint)
          S_OK)
      (set-error-info :iid 'i-robot
                      :description "Bad joint."))))
See also

define-com-method
get-error-info
refguid
hresult


LispWorks COM/Automation User Guide and Reference Manual - 21 Feb 2008

NextPrevUpTopContentsIndex