(Page 2 of 36 in this chapter) Version
dispApiError
Description
- Called by service API functions on errors to invoke a user-defined error handler, log a trace message, and return the error code.
Prototype
- DWORD dispApiError ( CTAHD ctahd,
DWORD errcode,
const char *func,
const char *info)
- ctahd Context handle.
- errcode Error code returned by API function.
- func Pointer to the name of the API function reporting the error.
- info Pointer to the character string with additional information about the error.
Return Values
- This function returns the return value of the application-supplied error handler or errcode if there is no handler.
Events
Details
- This function is usually called when returning an error from an API function call by using the CTAAPIERROR macro or the CTAAPIERRORINFO macro. It returns the error code passed in as an argument so it can be called in a function return statement.
- If tracing is enabled and either the application has specified CTA_EXIT_ON_ERRORS or CTA_REPORT_ERRORS as the error handler, or the global or context specific trace mask has the CTA_TRACEMASK_API_ERRORS bit set, dispApiError logs a trace record to ctdaemon.
- The Natural Access error macros, CTAAPIERRORINFO and CTAAPIERROR, are defined in ctadisp.h.
See Also
- dispError
, dispLogTrace
(Page 2 of 36 in this chapter) Version
Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights
reserved.