Specifying a function to be called if an OLE error occurs

on ole_error

Specify function to be called if an OLE error occurs


SYNTAX

on ole_error func_id

Registers a function to be called if an OLE control error occurs.

func_id

The identifier of the user function to be called. User functions are defined with the !function declaration.

The function is called with the following arguments:

func_id(ole_ctrl_id, hResult, Source, Description, HelpContext, HelpFile)

ole_ctrl_id

The identifier of the OLE control that caused the error. This is assigned in the control’s definition (+ | - ole ole_ctrl_id). See Defining an OLE control.

hResult

The OLE error number.

Source

Text string containing the function or property that caused the error.

Description

Text string containing a description of the error, if one exists. Otherwise blank.

HelpContext

Context id on the help file, if available. This can be used in conjunction with the help file to display an explanation of the error.

HelpFile

Pathname of the help file.

If an OLE error function has not been registered, Sculptor displays the error number in a normal debug message. The program $SCULPTOR/demo/ole/error.f accesses a Sculptor database containing OLE message numbers and descriptions, and can be used to consult the database for further information about the error.


RELATED TOPICS

Ole controls