yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
Error Handling Support

Default error messages and other error reporting support functions. More...

Collaboration diagram for Error Handling Support:

Functions

status_t set_error (const char *filename, int linenum, status_t status, int sqlError)
 Generate an internal programming error report. More...
 
void print_errors (void)
 Dump any entries stored in the error_stack.
 
void clear_errors (void)
 Clear the error_stack if it has any errors stored in it. More...
 
errtyp_t get_errtyp (status_t res)
 Get the error classification for the result code. More...
 
const char * get_error_string (status_t res)
 Get the error message for a specific internal error. More...
 
status_t errno_to_status (void)
 Get the errno variable and convert it to a status_t. More...
 
void status_init (void)
 Init this module. More...
 
void status_cleanup (void)
 Cleanup this module. More...
 
void print_error_count (void)
 Print the error_count field, if it is non-zero to STDOUT or the logfile. More...
 
void print_error_messages (void)
 Print the error number and error message for each error to STDOUT or the logfile. More...
 
void print_lang_error_messages (void)
 Print the error number and error message for each error to STDOUT or the logfile; used for error messages in multiple languages. More...
 

Detailed Description

Default error messages and other error reporting support functions.

The get_error_string() function is used throughout the system to convert a status_t enumeration to its default error message.

Function Documentation

◆ clear_errors()

void clear_errors ( void  )

Clear the error_stack if it has any errors stored in it.

Here is the caller graph for this function:

◆ errno_to_status()

status_t errno_to_status ( void  )

Get the errno variable and convert it to a status_t.

Must be called just after error occurred to prevent the errno variable from being overwritten by a new operation

Returns
status_t for the errno enum
Here is the caller graph for this function:

◆ get_error_string()

const char * get_error_string ( status_t  res)

Get the error message for a specific internal error.

Parameters
resinternal status_t error code
Returns
const pointer to error message

◆ get_errtyp()

errtyp_t get_errtyp ( status_t  res)

Get the error classification for the result code.

Parameters
resresult code
Returns
error type for 'res' parameter

◆ print_error_count()

void print_error_count ( void  )

Print the error_count field, if it is non-zero to STDOUT or the logfile.

Clears out the error_count afterwards so the count will start over after printing!!!

◆ print_error_messages()

void print_error_messages ( void  )

Print the error number and error message for each error to STDOUT or the logfile.

Here is the call graph for this function:

◆ print_lang_error_messages()

void print_lang_error_messages ( void  )

Print the error number and error message for each error to STDOUT or the logfile; used for error messages in multiple languages.

Here is the call graph for this function:

◆ set_error()

status_t set_error ( const char *  filename,
int  linenum,
status_t  status,
int  sqlError 
)

Generate an internal programming error report.

  • DO NOT USE THIS FUNCTION!
  • OBSOLETE! USE FLAG_INT_ERROR macro instead!

THIS FUNCTION IS NOT FOR REPORTING CLIENT ERRORS IN <rpc-error>

An error stack entry or if log_error is enabled, then log the error report right now.

Used to flag internal code errors only!!! Use log_error for normal errors expected during operation

This function call will force an assert(0) crash!!

DO NOT USE THIS FUNCTION DIRECTLY! USE THE SET_ERROR MACRO INSTEAD!

Parameters
filenameC filename that caused the error
linenumline number in the C file that caused the error
statusinternal error code
sqlErrormySQL error code (deprecated)
Returns
the 'status' parameter will be returned
Here is the call graph for this function:

◆ status_cleanup()

void status_cleanup ( void  )

Cleanup this module.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status_init()

void status_init ( void  )

Init this module.

Here is the caller graph for this function: