Previous PageTable Of ContentsHomeIndexNext Page


6.2. SRL Error Handling

Most SRL event management functions return a value that indicates success or failure:

NOTE:
The exception is the function sr_getevtdatap( ), which returns a NULL to indicate that there is no data associated with the current event.

If a function fails, the error can be retrieved using the ATDV_LASTERR( ) or ATDV_ERRMSGP( ) functions described in Section 7. SRL Standard Attribute Functions. If an SRL function fails, retrieve the error by using the ATDV_LASTERR( ) function with SRL_DEVICE as the argument. To retrieve a text description of the error, use ATDV_ERRMSGP.

For example, if the SRL function sr_getparm( ) fails, the error can be found by calling ATDV_LASTERR( ) with SRL_DEVICE as the argument.

Each function description in this section includes a list of the errors that can occur for that function. If the error returned by ATDV_LASTERR( ) is ESR_SYS, an error from the operating system has occurred; use dx_fileerrno( ) to obtain the system error value.

The error codes are defined in srllib.h and are listed in Table 3.


Table 3. Event Management Function Errors

Error Define

Error String

ESR_DATASZ

   · Invalid size for default event data memory

ESR_MODE

  • Illegal mode for this operation

ESR_NOERR

  • No standard runtime library errors

ESR_NOHDLR

  • No such handler

ESR_NOTIMP

  • Function is not implemented

ESR_PARMID

  • Unknown parameter ID

ESR_QSIZE

  • Illegal event queue size

ESR_SCAN

  • Standard runtime library scanning function returned an error

ESR_SYS

  • Error from operating system; use dx_fileerrno( ) to obtain error value.

ESR_TMOUT

  • Returned by ATDV_LASTERR(SRL_DEVICE) when an standard runtime library function timed out.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated January, 2001