[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: Branko ÄŒibej <brane_at_xbc.nu>
Date: 2007-04-28 22:13:28 CEST

Stefan Küng wrote:
> Hi,
>
> In the Subversion code, there are a lot of calls to the abort()
> function. I think those should be removed and replaced with something
> else.

Oh wow, you've gone and opened a can of worms that we've had trouble
closing in the past.

A note about assert vs. abort: As long as it remains common practice on
Windows to compile release binaries with NDEBUG defined, assert is worse
than useless.

Also, returning an error implies that we can (somehow) recover from it,
which isn't always the case.

We probably do call abort() in places where we could do something else;
such bits can be fixed. But we decided long ago on the policy to not
cater to clients that violate the API contract, so returning an error in
those cases would mean changing that policy. Nothing wrong with that in
general, it's just yet another can of worms.

I'm willing to consider using something else instead of abort(). But
someone will have to come up with a proposal that works everywhere, not
just in Windows GUI with just-in-time debugging.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 28 22:13:39 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.