Re: Getting "No error" instead of "No such file or directory" on Win32

Michael G Schwern <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <[email protected]>
On 2012.6.24 7:06 AM, Shlomi Fish wrote:
> [QUOTE]
> t/01basic.t ......................... ok
> 
> #   Failed test 'error parsing non-existent does_not_exist.xml'
> #   at t/02parse.t line 238.
> #                   'Could not create file parser context for file "does_not_exist.xml": No error at t/02parse.t line 237.
> # '
> #     doesn't match '(?-xism:\ACould not create file parser context for file "does_not_exist\.xml": No\ such\ file\ or\ directory)'
> # Looks like you failed 1 test of 531.
> t/02parse.t ......................... 
> Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/531 subtests 
> 
> [/QUOTE]
> 
> My question is - why?

Some systems stringify an errno value of 0 as "no error".  A few things could
have caused this:

1) Something might have set errno to 0 between the failure and the error being
printed.  Many I/O operations will do this, some at the OS level.

This could be in the CLEANUP_ERROR_HANDLER or REPORT_ERROR or even inside
xmlCreateFileParserCtxt itself.

2) The failure may not have been the result of an I/O failure causing errno to
never have been set.

Is there a guarantee that xmlCreateFileParserCtxt() sets errno reliably?


-- 
Stabbing you in the face so you don't have to.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.