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

Re: use of SVN_ERR_ASSERT (was: svn commit: r1302682 ...)

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 22 Mar 2012 14:12:09 -0400

On Thu, Mar 22, 2012 at 13:56, Daniel Shahaf <danielsh_at_elego.de> wrote:
> Greg Stein wrote on Thu, Mar 22, 2012 at 13:36:27 -0400:
>> On Thu, Mar 22, 2012 at 13:33, Daniel Shahaf <danielsh_at_elego.de> wrote:
>> > Greg Stein wrote on Thu, Mar 22, 2012 at 13:19:41 -0400:
>> >...
>> >> Daniel removed one of these ASSERT uses a day or two ago. My
>> >> assumption was that he was referring to that, rather than the ###.
>> >>
>> >
>> > Yes, by "these" I referred to to the use of assert(), abort(), and
>> > svn_error__malfunction().
>>
>> Oh, I definitely don't want to see any assert() or abort() calls. With
>> you there.
>>
>> But if you're suggesting that we stop using SVN_ERR_ASSERT(), then
>> that is a much larger question. I see no problem using them. "If we
>> don't have what we expect, then we've got big problems."
>>
>
> Huh?  In the code you just added, if I cut your wireless network wire
> then your libsvn_ra_serf would raise an assertion.  That's not the
> intended use of SVN_ERR_ASSERT().
>
> Why didn't you write
>
>  if (status != APR_EOF && status != APR_SUCCESS)
>    return svn_error_createf(); /* or svn_error_wrap_apr() */
>
> ?

Did you read the comment just above that? Expediency to get the code
written to the point where I could test it.

So where is your actual problem? My expedient code, or SVN_ERR_ASSERT?
You've been focusing on the latter, so we now have this thread. Which?

-g
Received on 2012-03-22 19:12:40 CET

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