[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: Daniel Shahaf <danielsh_at_elego.de>
Date: Thu, 22 Mar 2012 19:56:50 +0200

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() */

?

> Cheers,
> -g
Received on 2012-03-22 18:57:32 CET

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.