CA_Log_Error()

Purpose

Log an error.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int CA_Log_Error(
 int error_num,
 char *parm1,
 char *parm2,
 .
 .
 .
 char *parmN
);

Description

This subroutine logs an error in the Blueworx Voice Response error log and, optionally, displays it in the Alarms window. There are five errors defined for a custom server to use, each with a maximum of ten strings for parameters.

Note: If there are less than ten strings, the last parameter must be a NULL or the custom server will not work correctly.

If NetView® is installed, red alarms are sent as alerts to the NetView operator.

LOG_ONLY errors are logged in the error log, but do not appear in the Alarms window.

For an example of how to use this subroutine, see Logging errors.

Note: Using this routine causes CA_Poll() to return if CA_Poll() is being used by another process registered using the same CA_Init() call.

Parameters

error_num
Defines the severity of the error being logged. Valid values are:

ERR_CA_USER_DEFINED_RED

ERR_CA_USER_DEFINED_YELLOW

ERR_CA_USER_DEFINED_GREEN

ERR_CA_USER_DEFINED_WHITE

ERR_CA_USER_DEFINED_LOG_ONLY

parmN
A pointer to a null-terminated string to be written to the error log. You can specify up to ten string parameters. The combined length of the strings should not exceed 2048 bytes.

Return codes

0
Successful
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_NOT_INIT
CA_INV_REQUEST
CA_TERMINATING

Related information

None.