yumapro
24.10-3
YumaPro SDK
|
Default error messages and other error reporting support functions. More...
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... | |
boolean | is_yang_warning (status_t res) |
Check if the status code represents a YANG warning. More... | |
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.
void clear_errors | ( | void | ) |
Clear the error_stack if it has any errors stored in it.
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
const char * get_error_string | ( | status_t | res | ) |
Get the error message for a specific internal error.
res | internal status_t error code |
Get the error classification for the result code.
res | result code |
boolean is_yang_warning | ( | status_t | res | ) |
Check if the status code represents a YANG warning.
res | internal status_t error code to check |
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!!!
void print_error_messages | ( | void | ) |
Print the error number and error message for each error to STDOUT or the logfile.
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.
Generate an internal programming error report.
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!
filename | C filename that caused the error |
linenum | line number in the C file that caused the error |
status | internal error code |
sqlError | mySQL error code (deprecated) |
void status_cleanup | ( | void | ) |
Cleanup this module.
void status_init | ( | void | ) |
Init this module.