[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: abort() calls

From: Mark Reibert <svn_at_reibert.com>
Date: 2007-05-01 09:39:16 CEST

On Mon, 2007-04-30 at 16:03 -0400, C. Michael Pilato wrote:
> For myself, I try to apply the simple rule of thumb that abort() is useful
> for punishing naughty programmers (that is, those who pass malformed data
> into functions they call), but otherwise, it's probably a return-an-error
> situation. Bad data on disk doesn't violate the API contract, so ideally
> shouldn't trigger an abort.

Whereas I understand your distinction, this punitive approach seems a
bit draconian. After all, nobody would expect acos(2.0) to abort() just
because the caller does not understand trigonometry.

At the very least an application should be able to communicate with the
user if and when it is going down. Libraries taking down apps - even if
there is no sane path forward - removes this very important capability
from the application programmer.

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 1 09:39:25 2007

This is an archived mail posted to the Subversion Dev mailing list.