|
LogAnalysis
[logs] ugliest application logs ever? Jan 24 2008 02:14AM Anton Chuvakin (anton chuvakin org) (5 replies) Re: [logs] ugliest application logs ever? Jan 24 2008 09:12PM Leo D. Geoffrion (ldg skidmore edu) (1 replies) RE: [logs] ugliest application logs ever? Jan 24 2008 10:50PM Tina Bird (tbird precision-guesswork com) Re: [logs] ugliest application logs ever? Jan 24 2008 07:52PM Jason Lewis (jlewis packetnexus com) (1 replies) Re: [logs] ugliest application logs ever? Jan 24 2008 02:18PM David Corlette (DCorlette novell com) (3 replies) RE: [logs] ugliest application logs ever? Jan 25 2008 12:51AM Mark Poepping (poepping cmu edu) (1 replies) Re: [logs] ugliest application logs ever? Jan 24 2008 06:21AM John Kinsella (jlk thrashyour com) (3 replies) RE: [logs] ugliest application logs ever? Jan 24 2008 03:47PM Fenwick, Wynn (wynn fenwick cgi com) (1 replies) Re: [logs] ugliest application logs ever? Jan 24 2008 12:47PM Matt Cuttler (mcuttler bnl gov) (2 replies) RE: [logs] ugliest application logs ever? Jan 24 2008 08:09PM Rainer Gerhards (rgerhards hq adiscon com) (1 replies) RE: [logs] ugliest application logs ever? Jan 24 2008 05:00AM Tina Bird (tbird precision-guesswork com) (2 replies) RE: [logs] ugliest application logs ever? Jan 24 2008 05:23AM Marcus J. Ranum (mjr ranum com) (2 replies) |
|
Privacy Statement |
> "The Microsoft Exchange Information Store service depends on
> the Microsoft Exchange Directory service which failed to
> start because of the following error:
> The operation completed successfully."
I see this kind of thing a *lot*, on multiple platforms.
I suspect this happens because someone wrote a generic error handling
routine that includes the value of some global error function such as
strerror(errno). Sounds clever, but what if you call that function
for an error discovered logically instead of a system error? The
global errno contains success (since your last system function was
successful), so strerror(errno) contains "Success" or "Operation
Completed Successfully" or whatever.
The solution: when writing a generic error handing routine, understand
this issue and deal with it. One way to deal: write a routine that
displays a user-provided message, and *optionally*, also displays the
value of strerror(errno) (or language-specific equivalent.) In the
case where the caller specifies that a system error has occurred but
errno indicates success, the function should ignore the caller's
request, or display a suitable message ("unknown error", "generic
error", etc.) rather than the default success message. If the caller
does not specify a system error has occurred, even if errno indicates
failure, the routine should not automatically display strerror(errno),
because the last system call may have failed in a way that was
handled, and this log message may be a logical message unrelated to
the failure of the last system call.
IMHO, this should be in a FAQ somewhere. :)
- Morty
_______________________________________________
LogAnalysis mailing list
LogAnalysis (at) loganalysis (dot) org [email concealed]
http://www.loganalysis.org/mailman/listinfo/loganalysis
[ reply ]