httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] Proper reporting of Win32 errors
Date Mon, 01 Dec 1997 10:58:33 GMT
Paul Sutton wrote:
> 
> The current aplog_error() function cannot report on errors returned by
> Win32 functions. These functions do not bother setting errno - instead,
> you have to make a call to GetLastError() to get the error code, then call
> FormatMessage() to get the corresponding string. I already added code to
> do this in os/win32/service.c, but this was specific to reporting errors
> to standard error during apache -i or -u calls.
> 
> The patch below updates aplog_error() to enable generic logging of
> Win32 errors to the same place as other errors. It adds a new flag,
> APLOG_WIN32ERROR which if given in the _second_ argument to aplog_error()
> causes the Win32 error code and error string to be logged. Here is an
> example call (this is from worker_main()):

Good plan, but I wonder whether we should always log the Win32 error
(unless APLOG_NOERRNO is set, of course), rather than having to
explicitly flag it?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message