minor update of an error message

This commit is contained in:
hyung-hwan 2021-12-31 06:31:57 +00:00
parent 72724799b3
commit ff6f895c31

View File

@ -166,7 +166,7 @@ static HCL_INLINE int open_input (hcl_t* hcl, hcl_ioinarg_t* arg)
#endif
if (!bb->fp)
{
hcl_seterrnum (hcl, HCL_EIOERR);
hcl_seterrbfmt (hcl, HCL_EIOERR, "unable to open %hs", bb->fn);
goto oops;
}
@ -309,6 +309,9 @@ static HCL_INLINE int open_output (hcl_t* hcl, hcl_iooutarg_t* arg)
#endif
if (!fp)
{
if (xtn->print_path)
hcl_seterrbfmt (hcl, HCL_EIOERR, "unable to open %hs", xtn->print_path);
else
hcl_seterrnum (hcl, HCL_EIOERR);
return -1;
}