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

Re: svn commit: r19823 - in branches/merge-tracking: . subversion/tests/libsvn_subr

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-05-31 03:13:25 CEST

On Fri, 26 May 2006, C. Michael Pilato wrote:

> Garrett Rooney wrote:
> > On 5/25/06, dlr@tigris.org <dlr@tigris.org> wrote:
> >
> >> + /* Trigger some error(s) with mal-formed input. */
> >> + err = svn_parse_mergeinfo(BOGUS_MERGEINFO_LINE,
> >> &path_to_merge_ranges,
> >> + pool);
> >> + if (!err)
> >> + return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
> >> + "svn_parse_mergeinfo (%s) succeeded "
> >> + "unexpectedly", BOGUS_MERGEINFO_LINE);
> >
> >
> > Probably want a svn_error_clear here.

Yes I do, thanks Garrett.

> Or, nest the error so folks can see the specifics of the failure.
>
> return svn_error_createf(SVN_ERR_TEST_FAILED, err,
> "svn_parse_mergeinfo (%s) succeeded "
> "unexpectedly", BOGUS_MERGEINFO_LINE);

In this case, there's no error to nest -- I'm *expecting* an error due
to malformed input.

Conversely, I was nesting errors in a couple of spots which I
shouldn't have been because I know there's no error (no functional
difference, but lacking in clarity). Fixed up in r19861, thanks for
the review.

-- 
Daniel Rall

  • application/pgp-signature attachment: stored
Received on Wed May 31 03:14:02 2006

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