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

Re: [RFC] Replacement for "assert" in the libraries

From: Branko Čibej <brane_at_xbc.nu>
Date: Sat, 14 Jun 2008 01:43:29 +0200

Julian Foad wrote:
> The CHANGE from current behaviour to new behaviour when this macro is
> substituted for current uses of assert() (in places where it can be
> substituted without further changes) is:
>
> * if a bug is encountered that triggers one of these assertions,
> the program will now stop through Subversion's error reporting
> mechanism instead of by aborting, except that:
>
> * in cases where the software is designed to catch svn_error_t
> error objects, it may now ignore the error or do something other
> than the default of reporting the error and stopping.
>

[...]

> Oh, and direct "abort" calls: these are almost invariably used as a form
> of assertion, and in those cases I advocate replacing them with
> SVN_ERR_ASSERT.
>

Ah this puts things in perspective. I wouldn't object to something like
this (in retrospect, our use of abort() was not the best idea).

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-14 01:44:19 CEST

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.