NextPrevUpTopContentsIndex

com-error

Condition Class
Summary

The condition class used to signal errors from COM.

Package

com

Superclasses

error

Initargs

:hresult

An integer giving the hresult of the error.

:function-name

Either nil or a string or symbol describing the function that generated the error.

Readers

com-error-hresult
com-error-function-name

Description

The class com-error is used by the Lisp COM API when signalling errors that originate as hresult code from COM.

Example

This function silently ignores the E_NOINTERFACE error:

(defun call-ignoring-nointerface-error (function)
  (handler-bind
      ((com-error
        #'(lambda (condition)
            (when (hresult-equal (com-error-hresult
                                  condition)
                                 E_NOINTERFACE)
              (return-from
                  call-ignoring-nointerface-error
                nil)))))
    (funcall function)))
See also

check-hresult
hresult-equal
hresult


LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2005

NextPrevUpTopContentsIndex