dmGetError(3dm) dmGetError(3dm) NAME dmGetError, dmGetErrorForPID - retrieve an error number, message, and detail for Digital Media errors SYNOPSIS #include <dmedia/dmedia.h> const char *dmGetError(int *errornum, char error_detail[DM_MAX_ERROR_DETAIL]) const char *dmGetErrorForPID(pid_t pid, int *errornum, char error_detail[DM_MAX_ERROR_DETAIL]) PARAMETERS pid The process id in which to check for an error. In dmGetError(), this defaults to the current pid as returned by getpid(2). errornum A pointer to an integer into which the error number of the current error will be loaded. If errornum is NULL, it will be ignored. error_detail The address of a char array of size DM_MAX_ERROR_DETAIL, allocated in the application's memory space. A detailed description of the error will be loaded into this array, if such a description is available. This string will be null-terminated. If error_detail is NULL, it will be ignored. DESCRIPTION dmGetError() is designed to allow an application to handle error conditions generated within a large number of independent digital media units (i.e., the Movie Libraries, the Audio File Library, Audio Conversion and Image Conversion utilities) in a single location. In addition to the short error string returned by the function call, an application may also optionally retrieve a more detailed description of the error plus the actual error number. The internal setting and public retrieval of these errors is guaranteed to be thread-safe. RETURNED VALUE Returns a pointer to a null-terminated character string (in static memory) which indicates the category of the error. Only the most recent error for a given thread will be returned. If no errors have occurred, dmGetError() returns NULL. ERROR NUMBERS The error numbers returned in errornum fall into ranges determined by the digital media unit which generated it. The currently defined ranges are as follows: 0-999 UNIX System Errors (identical to those returned via oserror(3c) 1000-1999 Color Space Library Errors (libdmedia) 2000-2999 Movie Library Errors (libmoviefile, libmovieplay) 3000-3999 Audio File Library Errors (libaudiofile) 4000-4999 DMbuffer Errors (libdmedia) 5000-5999 Audio Converter Errors (libdmedia) 6000-6999 Image Converter Errors (libdmedia) 10000-10999 Global Digital Media Library Errors (libdmedia) 11000-11999 FX Plug-in Utility Library Errors (libfxplugutils) 12000-12999 FX Plug-in Manager Library Errors (libfxplugmgr) SEE ALSO mvIntro(3dm), mvGetErrno(3dm), afIntro(3dm), dmedia(3dm) Page 2