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

RE: How best to handle errors that differ depending on RA method

From: Paul Burba <pburba_at_collab.net>
Date: Thu, 6 Mar 2008 08:03:58 -0800

> -----Original Message-----
> From: Karl Fogel [mailto:kfogel_at_red-bean.com]
> Sent: Monday, December 17, 2007 3:51 AM
> To: Paul Burba
> Cc: dev_at_subversion.tigris.org
> Subject: Re: How best to handle errors that differ depending
> on RA method
>
> "Paul Burba" <pburba_at_collab.net> writes:
> > Here is the behavior of svn_ra_get_locations() for each RA method:
> >
> > --------------------------------------------
> >
> > RA_LOCAL/RA_SVN:
> >
> > Returns SVN_ERR_FS_NOT_FOUND,
> >
> > - err
> > apr_err 160013 int
> > + message 0x00fba5c8 "File not found: revision 4, path
> > '/A/D/G/rho_copy'" const char *
> > + child 0x00000000 {apr_err=??? message=??? child=???
> > ...} svn_error_t *
> > pool 0x00fba568 apr_pool_t *
> > + file 0x00708c5c
> > "..\..\..\subversion\libsvn_fs_fs\tree.c" const char *
> > line 669 long
> >
> > --------------------------------------------
> >
> > RA_SERF:
> >
> > Returns SVN_NO_ERROR, sets *LOCATIONS to an empty hash.
> > svn_client__repos_locations() then returns a
> > SVN_ERR_CLIENT_UNRELATED_RESOURCES error.
> >
> > --------------------------------------------
> >
> > RA_NEON:
> >
> > Returns two SVN_ERR_RA_DAV_PATH_NOT_FOUND errors,
> >
> > [...]
> >
> > --------------------------------------------
> >
> > How much of a problem is this inconsistency considered?
>
> It's a problem, because it's even visible at the API level.
>
> > *If* it is a problem...where is typically the best place to fix it:
> >
> > A) At the client level in ra.c:svn_client__repos_locations()?
> >
> > B) In the particular RA implementation, e.g.
> > libsvn_ra_neon/get_locations.c:svn_ra_neon__get_locations()?
> >
> > C) Or possibly even on the server side, e.g.
> > mod_dav_svn/reports/dav_svn__get_locations_report()?
>
> The fix(es) should happen as close to the original
> (server-side) source of the error as possible, IMHO.
>
> > D) Simply account for the different errors in the callers of
> > svn_client__repos_locations()?
>
> (C) is best, then (B), then (A), then (D), would you agree?

Sorry Karl, I completely let this slip. The very same topic has been
taken up in
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=135787.
Just want to point any discussion on this topic to that thread.

Paul
 
> -Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-06 17:26:26 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.