Error handling

A Monitor Client Library application installs an error handler when it creates a connection (smc_connect_alloc, described on §). This error handler is called whenever an error occurs for that connection.

Most Monitor Client Library functions return one of the following values:

Table 3-2: Return values

Return value

Description

SMC_RET_SUCCESS

The function completed successfully.

SMC_RET_FAILURE

The function failed. More detailed information is available from the error handler.

SMC_RET_INVALID_CONNECT

The function did not execute because it was requested against an erroneous connection. The error handler is not invoked because error handlers are available only for valid connections.

Other return values are listed with the functions that return them.

NoteThe error callback function is not triggered under certain error conditions regarding data item specification in smc_create_view and smc_create_alarm. To capture these error conditions, check the return code for these functions.