bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] hash.c change to use abort rather than assert


From: Karl Berry
Subject: Re: [Bug-gnulib] hash.c change to use abort rather than assert
Date: Sat, 23 Nov 2002 10:00:58 -0500

    as the GNU Coding Standards
            hint that one should use `if (! x) abort ();' 

For whatever it's worth ...

Personally I dislike bare abort's (I don't have huge feelings about it
one way or the other).  The reason is that if it gets triggered one just
gets a core dump with no additional information.

I know rms thinks you're then supposed to run it under a debugger,
reproduce the problem, and fix it, but in practice this is not always so
easy.  And it mystifies users, so bug reports aren't as helpful, they
feel disempowered and are less likely to attempt a fix on their own, etc.

So I always write something like fatal ("unexpected foo happened"), and
include as much information as possible (and don't bother dumping core).
It doesn't hurt anything to do this, and sometimes it helps.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]