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

Re: svn commit: r19108 - trunk/subversion/libsvn_ra_serf

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-03-31 21:58:01 CEST

Daniel Rall writes:
> On Fri, 31 Mar 2006, Garrett Rooney wrote:
>
> > On 3/31/06, Justin Erenkrantz <justin@erenkrantz.com> wrote:
> > > On 3/31/06, Daniel Rall <dlr@collab.net> wrote:
> > > > I prefer Greg's suggested form on the grounds that it seems more
> > > > consistent with error handling in the rest of Subversion's source.
> > >
> > > It's a variable not a function. That's why it seems, well, wrong.
> >
> > I've seen that idiom (wrapping a variable in SVN_ERR) used in other
> > places in the svn code. It's not overly common though.
>
> Based on the macro's doc string, I can see where Justin's reaction was
> coming from.
>
> However, there's really little reason to avoid use of SVN_ERR(expr)
> when expr is not a function call. How about something like this?:
>
+1. I prefer this use in some context, if nothing else, just because a
one-line should be a one-line;) OTOH, in a series of if statements:
if (err && err->apr == ...)
  ...
else if (...)
  ...
else if (err)
  return err;

I think the explicit use is easier to read.

Just my 2 öre (Swedish counterpart to cent)
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 31 22:02:09 2006

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.