OpenSpeech Browser

Getting Started
Architecture Description
Integration Guide

Copyright (c) 1998-2001 SpeechWorks International, Inc. All Rights Reserved.



VXIlogResult Error

(struct VXIlogInterface* pThis,
  const VXIchar* moduleName,
  VXIunsigned errorID,
  const VXIchar* format,
  ...)

Log an error
Basic error reporting mechanism. Errors are reported by moduleName, error number, a format, and a varargs argument list.

IMPORTANT: Error details are not free-form, they must be passed as a succession of key-value pairs, i.e. a string key followed by a value. For example, this format string and arguments is correct:

L"%s%i%s%s", L"key1", 911, L"key2", L"value2"

While this one is incorrect (second key missing):

L"%s%i%f", L"key1", 911, (float)22 / 7

Keys must always be specified by a %s, and the key names must follow the rules for XML names as summarized at the top of this header. Values may be specified by the ANSI C defined format parameters for printf( ), including the ability to control string widths, number of decimals to output, padding etc. There are no restrictions on the variable values, it is the responsibility of the logging system to escape the variable values if required by the final output stream (such as output via XML).

NOTE: Do NOT use %C and %S in the format string for inserting narrow character buffers (char and char *) as supported by some compilers, as this is not portable and may result in system crashes on some UNIX variants if the VXIlog implementation uses the compiler supplied printf( ) family of functions for handling these variable argument lists.

Parameters:
moduleName - [IN] Name of the software module that is outputting the error. See the top of this file for moduleName allocation rules.
errorID - [IN] Error number to log, this is mapped to localized error text that is displayed to the system operator that has an associated severity level. It is CRITICAL that this provides primary, specific, actionable information to the system operator, with attribute/value pairs only used to provide details. See the top of this file for errorID allocation rules.
format - [IN] Format string as passed to wprintf( ) (the wchar_t version of printf( ) as defined by the ANSI C standard) for outputting optional error details. This is followed by a variable list of arguments supplying variables for insertion into the format string, also as passed to wprintf( ).
... - [IN] Arguments matching the error details format specified above.
Returns:
VXIlog_RESULT_SUCCESS on success

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.