LispWorks COM/Automation User Guide and Reference Manual > 4 Automation Reference Entries

NextPrevUpTopContentsIndex

get-error-info

Function
Summary

Retrieves the error information for the current Automation method.

Package

com

Signature

get-error-info &key errorp fields => field-value *

Arguments

errorp

A boolean. If true and an error occurs while retrieving the error information, then an error of type com-error is signalled. Otherwise nil is returned.

fields

A list of keywords specifying the error information fields to return.

Values

field-value*

Values corresponding to the fields argument.

Description

The function get-error-info allows the various components of the error information to be retrieved for the last Automation method called. The fields should be a list of the following keywords, to specify which fields of the error information should be returned:

:iid

A refguid object.

:source

A string specifying the ProgID.

:description

A string describing the error.

:help-file

A string giving the help file's path.

:help-context

An integer giving the help context id.

A field-value will be returned for each field specified. The field-value will be nil if the field is does not have a value.

Example
(multiple-value-bind (source description)
    (get-error-info :fields '(:source :description))
  (error "Failed with '~A' in ~A" description source))
See also

set-error-info
call-dispatch-method
com-error


LispWorks COM/Automation User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex