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

Re: svn commit: r933272 - in /subversion/trunk/subversion/libsvn_wc: update_editor.c wc_db.c

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 12 Apr 2010 12:47:23 -0400

On Mon, Apr 12, 2010 at 12:35, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> On Mon, 2010-04-12 at 11:48 -0400, Greg Stein wrote:
>> On Mon, Apr 12, 2010 at 11:19,  <julianfoad_at_apache.org> wrote:
>> >...
>...
>> > +      SVN_ERR(svn_sqlite__reset(stmt));
>> > +      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
>> > +                               _("The pristine text with checksum '%s' was "
>> > +                                 "not found"),
>> > +                               svn_checksum_to_cstring_display(sha1_checksum,
>> > +                                                               scratch_pool));
>> >     }
>>
>> You could write it as:
>>
>>   return svn_error_createf(ERR, svn_sqlite__reset(stmt), ...);
>>
>> *shrug*
>
> I think nesting an error normally implies that the nested error was the
> cause of the top-level error, so that way doesn't look right to me.  My
> way is used in some places, that way in other places.

Well... I don't think you want a sqlite error to be returned as
primary. The PATH_NOT_FOUND is primary. Then, there is a secondary
error around reset. Basically, it is just using create's CHILD param
as a cheap composition of the errors (rather than
svn_error_compose_create)

>...

Cheers,
-g
Received on 2010-04-12 18:48:05 CEST

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