Retrieves the error information for the current Automation method.
com
get-error-info &key errorp fields => field-value*
errorp⇩ |
A boolean. |
fields⇩ |
A list of keywords specifying the error information fields to return. |
field-value* |
Values corresponding to fields. |
The function get-error-info
allows the various components of the error information to be retrieved for the last Automation method called. 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.
If errorp is true and an error occurs while retrieving the error information, then an error of type com-error is signaled. Otherwise nil
is returned.
(multiple-value-bind (source description) (get-error-info :fields '(:source :description)) (error "Failed with '~A' in ~A" description source))
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41