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

Re: [PATCH] Replacement for "assert" in the libraries - issue #2780

From: Mark Phippard <markphip_at_gmail.com>
Date: Mon, 30 Jun 2008 17:38:09 -0400

2008/6/30 Julian Foad <julianfoad_at_btopenworld.com>:
> I discovered that this is part of issue #2780, summary line "remove
> abort() and assert() calls".
>
> On Wed, 2008-06-18 at 16:01 +0100, Julian Foad wrote:
>> The attached "assert-mech.patch" provides an assertion-checking macro
>> that gives the application author control over how assertion failures
>> are handled. This is intended to replace many instances of "assert()"
>> and "abort()" in Subversion libraries. It allows the error to be
>> propagated and handled through Subversion's svn_error_t cascading, and
>> this is the default behaviour.
>
> I changed the default behaviour to be "print to stderr, and then abort"
> for backward compatibility. I removed the controversial line that
> previously said the callback function could return SVN_NO_ERROR. I also
> made all the naming much more self-consistent.
>
> I have now checked in a version of this patch as r31931. I think there
> was broad consensus that this will be an improvement. If I'm wrong about
> that or it needs more work, let me know. I'd be particularly glad to
> hear from GUI authors such as Mark Phippard and Steve King.

I am in favor of it in concept. I have been fortunate enough to not
run across code that does an abort/assert very often. One example
where we did, however, was in Serf. In Subclipse we call the info API
on a URL to see if a path exists. When it doesn't Serf would just
abort. This made it unusable in Subclipse because this brought down
the entire IDE. Thankfully, Lieven eventually fixed this and a number
of other aborts in the ra_serf code.

It'd be great if whatever we did with this new change allowed the
JavaHL C++ library to turn it into a Java exception. That might be
hoping for too much though.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
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-30 23:38:24 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.