![]() |
yumapro
25.10-1
YumaPro SDK
|
Handle compiler error messages. More...

Functions | |
| status_t | errmsg_init (void) |
| Initialize this module; must be after ext_init!!! More... | |
| void | errmsg_cleanup (void) |
| Cleanup this module; must be before ext_cleanup!!! More... | |
| void | errmsg_dict_init (void) |
| Initialize this module. More... | |
| void | errmsg_dict_cleanup (void) |
| Cleanup this module. More... | |
| status_t | errmsg_dict_insert (const xmlChar *lang, ncx_errmsg_t *errmsg) |
| Add a list entry to the errmsg_dict. More... | |
| ncx_errmsg_t * | errmsg_dict_find (const xmlChar *lang, status_t findres) |
| Find a value node from the specified language tree. More... | |
| void | ncx_print_errormsg (tk_chain_t *tkc, ncx_module_t *mod, status_t res) |
| Print an parse error message to STDOUT. More... | |
| void | ncx_print_errormsg_ex (tk_chain_t *tkc, ncx_module_t *mod, status_t res, const char *filename, uint32 linenum, boolean fineoln) |
| Print an parse error message to STDOUT (Extended) More... | |
| void | ncx_conf_exp_err (tk_chain_t *tkc, status_t result, const char *expstr) |
| Print an error for wrong token, expected a different token. More... | |
| void | ncx_mod_exp_err (tk_chain_t *tkc, ncx_module_t *mod, status_t result, const char *expstr) |
| Print an error for wrong token, expected a different token. More... | |
| void | ncx_mod_missing_err (tk_chain_t *tkc, ncx_module_t *mod, const char *stmtstr, const char *expstr) |
| Print an error for wrong token, mandatory sub-statement is missing. More... | |
| ncx_errmsg_t * | ncx_new_errmsg (status_t res, const xmlChar *str) |
| Malloc and init an ncx_errmsg_t struct. More... | |
| void | ncx_free_errmsg (ncx_errmsg_t *msg) |
| Clean and free an ncx_errmsg_t struct. More... | |
| void | obj_errmsg_clean (obj_template_t *obj) |
| Clean the error messages within an object template. More... | |
| status_t | obj_errmsg_add (obj_template_t *obj, const xmlChar *basestr, obj_errmsg_t **ret_errmsg) |
| Create a new obj_errmsg struct for the object. More... | |
| status_t | obj_errmsg_add_parm (obj_errmsg_t *errmsg, const xmlChar *parmstr) |
| Add an errmsg parameter for the object. More... | |
| status_t | obj_errmsg_add_filter (obj_errmsg_t *errmsg, const xmlChar *parmstr, boolean is_errortag) |
| Add an errmsg filter for the object. More... | |
| status_t | obj_errmsg_set_lang (obj_errmsg_t *errmsg, const xmlChar *langstr) |
| Set the errmsg-lang for the errmsg. More... | |
| status_t | obj_errmsg_check_val (const xmlChar *error_tag, const xmlChar *error_app_tag, const xmlChar *error_lang, val_value_t *error_val, xmlChar **retmsg) |
| Get the custom error message if any configured for the eror_val. More... | |
| status_t | obj_errmsg_test_val (const xmlChar *error_tag, const xmlChar *error_app_tag, const xmlChar *error_lang, val_value_t *error_val) |
| Check if there needs to be a custom error msg. More... | |
Handle compiler error messages.
Handles YANG extensions for errmsg:
Lower level error message support for server and compiler
obj_errmsg_t
obj_errmsg_parm_t
obj_errmsg_filter_t
| void errmsg_cleanup | ( | void | ) |
Cleanup this module; must be before ext_cleanup!!!

| void errmsg_dict_cleanup | ( | void | ) |
Cleanup this module.


| ncx_errmsg_t * errmsg_dict_find | ( | const xmlChar * | lang, |
| status_t | findres | ||
| ) |
Find a value node from the specified language tree.
This is an internal API used only by errmsg.c
| lang | language code to use for the key |
| findres | status number to search for this error message |
| void errmsg_dict_init | ( | void | ) |
Initialize this module.


| status_t errmsg_dict_insert | ( | const xmlChar * | lang, |
| ncx_errmsg_t * | errmsg | ||
| ) |
Add a list entry to the errmsg_dict.
Each tree represents the error messages for the specified language code
This is an internal API used only by errmsg.c
| lang | language code key for this error message |
| errmsg | error message to insert in the tree for lang |

| status_t errmsg_init | ( | void | ) |
Initialize this module; must be after ext_init!!!


| void ncx_conf_exp_err | ( | tk_chain_t * | tkc, |
| status_t | result, | ||
| const char * | expstr | ||
| ) |
Print an error for wrong token, expected a different token.
| tkc | token chain |
| result | error code |
| expstr | expected token description |

| void ncx_free_errmsg | ( | ncx_errmsg_t * | msg | ) |
Clean and free an ncx_errmsg_t struct.
| msg | struct to clean and free |
| void ncx_mod_exp_err | ( | tk_chain_t * | tkc, |
| ncx_module_t * | mod, | ||
| status_t | result, | ||
| const char * | expstr | ||
| ) |
Print an error for wrong token, expected a different token.
| tkc | token chain |
| mod | module in progress |
| result | error code |
| expstr | expected token description |


| void ncx_mod_missing_err | ( | tk_chain_t * | tkc, |
| ncx_module_t * | mod, | ||
| const char * | stmtstr, | ||
| const char * | expstr | ||
| ) |
Print an error for wrong token, mandatory sub-statement is missing.
| tkc | token chain |
| mod | module in progress |
| stmtstr | parent statement |
| expstr | expected sub-statement |


| ncx_errmsg_t * ncx_new_errmsg | ( | status_t | res, |
| const xmlChar * | str | ||
| ) |
Malloc and init an ncx_errmsg_t struct.
Create an error message str mapping for status res
| res | status enum index |
| str | const string to point at |
| void ncx_print_errormsg | ( | tk_chain_t * | tkc, |
| ncx_module_t * | mod, | ||
| status_t | res | ||
| ) |
Print an parse error message to STDOUT.
Used by the YANG compiler to generate the formatted error line after log_error is called
| tkc | token chain (may be NULL) |
| mod | module in progress (may be NULL) |
| res | error status |

| void ncx_print_errormsg_ex | ( | tk_chain_t * | tkc, |
| ncx_module_t * | mod, | ||
| status_t | res, | ||
| const char * | filename, | ||
| uint32 | linenum, | ||
| boolean | fineoln | ||
| ) |
Print an parse error message to STDOUT (Extended)
Used by the YANG compiler to generate the formatted error line after log_error is called
| tkc | token chain (may be NULL) |
| mod | module in progress (may be NULL) |
| res | error status |
| filename | script filespec |
| linenum | script file line number |
| fineoln | TRUE if finish with a newline, FALSE if not |


| status_t obj_errmsg_add | ( | obj_template_t * | obj, |
| const xmlChar * | basestr, | ||
| obj_errmsg_t ** | ret_errmsg | ||
| ) |
Create a new obj_errmsg struct for the object.
| obj | object to set errmsg | |
| basestr | base error string | |
| [out] | ret_errmsg | address of return message
|

| status_t obj_errmsg_add_filter | ( | obj_errmsg_t * | errmsg, |
| const xmlChar * | parmstr, | ||
| boolean | is_errortag | ||
| ) |
Add an errmsg filter for the object.
| errmsg | error message control block to set |
| parmstr | parameter string |
| is_errortag | TRUE if error-tag; FALSE if error-app-tag |

| status_t obj_errmsg_add_parm | ( | obj_errmsg_t * | errmsg, |
| const xmlChar * | parmstr | ||
| ) |
Add an errmsg parameter for the object.
| errmsg | object error message to set |
| parmstr | parameter string |

| status_t obj_errmsg_check_val | ( | const xmlChar * | error_tag, |
| const xmlChar * | error_app_tag, | ||
| const xmlChar * | error_lang, | ||
| val_value_t * | error_val, | ||
| xmlChar ** | retmsg | ||
| ) |
Get the custom error message if any configured for the eror_val.
| error_tag | error-tag value from error in progress | |
| error_app_tag | error-app-tag value from error in progress (may be NULL) | |
| error_lang | errmsg-lang language code to use | |
| error_val | error value node to check for errmsg config and use as the context node for any XPath eval | |
| [out] | retmsg | address of return address string
|

| void obj_errmsg_clean | ( | obj_template_t * | obj | ) |
Clean the error messages within an object template.
| obj | object to check to clean |


| status_t obj_errmsg_set_lang | ( | obj_errmsg_t * | errmsg, |
| const xmlChar * | langstr | ||
| ) |
Set the errmsg-lang for the errmsg.
| errmsg | error message control block to set |
| langstr | language code string |

| status_t obj_errmsg_test_val | ( | const xmlChar * | error_tag, |
| const xmlChar * | error_app_tag, | ||
| const xmlChar * | error_lang, | ||
| val_value_t * | error_val | ||
| ) |
Check if there needs to be a custom error msg.
| error_tag | error-tag value from error in progress |
| error_app_tag | error-app-tag value from error in progress (may be NULL) |
| error_lang | errmsg-lang language code to use |
| error_val | error value node to check for errmsg config and use as the context node for any XPath eval |
