removed hawk_rtx_seterror()

This commit is contained in:
hyung-hwan 2020-01-03 14:22:20 +00:00
parent dae8b5428d
commit 9cae5a6130
2 changed files with 6 additions and 30 deletions

View File

@ -529,24 +529,6 @@ void hawk_rtx_seterrufmt (hawk_rtx_t* rtx, const hawk_loc_t* errloc, hawk_errnum
rtx->_gem.errloc = (errloc? *errloc: _nullloc);
}
void hawk_rtx_seterror (hawk_rtx_t* rtx, hawk_errnum_t errnum, const hawk_oocs_t* errarg, const hawk_loc_t* errloc)
{
/* TODO: remove awk_rtx_seterror() and substitute hawk_rtx_seterrfmt()/seterrbfmt()/seterrufmt() */
const hawk_ooch_t* errfmt;
rtx->_gem.errnum = errnum;
errfmt = hawk_geterrstr(hawk_rtx_gethawk(rtx))(hawk_rtx_gethawk(rtx), errnum);
HAWK_ASSERT (errfmt != HAWK_NULL);
/* TODO: this change is buggy... copying won't process arguments...
hawk_strxfncpy (rtx->_gem.errmsg, HAWK_COUNTOF(rtx->_gem.errmsg), errfmt, errarg);
*/
hawk_copy_oocstr(rtx->_gem.errmsg, HAWK_COUNTOF(rtx->_gem.errmsg), errfmt);
/* TODO: remove awk_rtx_seterror() and substitute hawk_rtx_seterrfmt()/seterrbfmt()/seterrufmt() */
rtx->_gem.errloc = (errloc? *errloc: _nullloc);
}
void hawk_rtx_errortohawk (hawk_rtx_t* rtx, hawk_t* hawk)
{
/* copy error information in 'rtx' to the 'hawk' object */

View File

@ -2480,15 +2480,9 @@ HAWK_EXPORT void hawk_rtx_seterrufmt (
#endif
/**
* The hawk_rtx_seterror() function sets error information.
* The hawk_rtx_errortohawk() function copies the error information stored
* in the \a rtx object to the \a hawk object.
*/
HAWK_EXPORT void hawk_rtx_seterror (
hawk_rtx_t* rtx, /**< runtime context */
hawk_errnum_t errnum, /**< error number */
const hawk_oocs_t* errarg, /**< argument array for formatting an error message */
const hawk_loc_t* errloc /**< error line */
);
HAWK_EXPORT void hawk_rtx_errortohawk (
hawk_rtx_t* rtx,
hawk_t* hawk