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

Re: svn commit: r1501049 - in /subversion/trunk/subversion: include/svn_error_codes.h libsvn_ra_serf/util_error.c

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Tue, 9 Jul 2013 14:52:40 +0000

On Tue, Jul 09, 2013 at 05:12:23PM +0300, 'Daniel Shahaf' wrote:
> Bert Huijben wrote on Tue, Jul 09, 2013 at 15:34:56 +0200:
> > The tens of thousands of Windows defined error codes are not mapped by
> > Subversion or apr either, but they are certainly useful for applications. We
> > never documented that all of them must be mapped as enum value. apr_status
> > is an int for a reason.
> >
>
> False comparison. apr_err has a set of values specifically reserved for
> OS errors. An application can do APR_IS_OS_ERROR() followed by
> APR_FROM_OS_ERROR() followed by detailed inspection to its heart's
> contnet. Point being: inclusion of OS errors in the apr_status_t value
> is part of APR's API contract --- but including serf errors in
> err->apr_err is not part of our API.

BTW, the analogy continues: if we want to put 120171 in err->apr_err, we
should provide something in our API that lets our API consumers work with
it. For example:
#define SVN_ERROR_IS_SERF_ERROR(status) ((status) >= 120100 && (status) < 121000))
Received on 2013-07-09 16:52:48 CEST

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.