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

Re: PATCH: Errors that are ignored but should be cleared

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-26 20:50:09 CET

C. Michael Pilato wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>I also found the following, but we might as well evaluate the "###
>>... todo" comments and do the right thing while we are thinking
>>about it, so what is the right thing? Just clear and ignore the
>>error, or not?
>>
>>~/src/subversion> grep -C3 "svn_repos_abort_report" subversion/mod_dav_svn/update.c
>> if (! SVN_IS_VALID_REVNUM (rev))
>> {
>> /* ### This removes the fs txn. todo: check error. */
>> svn_repos_abort_report(rbaton);
>> serr = svn_error_create (SVN_ERR_XML_ATTRIB_NOT_FOUND,
>> NULL, "rev");
>> return dav_svn_convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
>
> In all these cases there is some error more important than the result
> of svn_repos_abort_report(). So, perhaps just do:
>
> svn_error_clear(svn_repos_abort_report(rbaton));
>
> It's not as if the user is going to be able to do a darned thing about
> a transaction that didn't get cleaned up from alllll the way across
> the network. -)

Indeed. I'll do that.

I'm not clear on the intent of the existing comment. Should I delete the comment, or leave in place a comment saying "Remove the fs txn." if removing the txn is the intent of the call, or "(This removes the fs txn.)" if that is just a notable side-effect of the call?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 26 20:48:20 2003

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