Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: svn commit: r35328 - in trunk/subversion/mod_dav_svn: . reports

subversion
Discussion topic

Back to topic list

Re: svn commit: r35328 - in trunk/subversion/mod_dav_svn: . reports

Author gstein
Full name Greg Stein
Date 2009-01-21 10:46:34 PST
Message On Wed, Jan 21, 2009 at 17:41, C. Michael Pilato <cmpilato at collab dot net> wrote:
> Greg Stein wrote:
>> On Mon, Jan 19, 2009 at 18:40, C. Michael Pilato <cmpilato at collab dot net> wrote:
>>> ...
>>> +++ trunk/subversion/mod​_dav_svn/reports/get​-locks.c Mon Jan 19 09:40:49 2009 (r35328)
>>> ...
>>> + if ((apr_err = send_get_lock_response(locks, output, bb, resource->pool)))
>>> + derr = dav_svn__convert_err​(svn_error_create(ap​r_err, 0, NULL),
>>> HTTP_INTERNAL_SERVER_ERROR,
>>> - "Error flushing brigade.",
>>> + "Error writing REPORT response.",
>>> resource->pool);
>>
>> Gah. Use dav_new_error() please.
>
> I'm looking at dav_new_error(), and I think there's an information loss to
> be had if I use that:
>
> dav_new_error() accepts:
> - the HTTP status code
> - what appears to be a magic DAV error code (which we always pass as
> 0 from mod_dav_svn)

That should be serr->apr_err

> - the error string
> - a pool
>
> dav_svn__convert_err() accepts:
> - the HTTP status code
> - an svn_error_t *, from which is made a dav_error chain that seems to
> preserve apr_err)

Yup. The conversion uses ->apr_err for the error_id field.

> - the error string
> - a pool
>
> So, by using the former, we appear to be losing a useful bit of information:
> the original apr_status_t value. Am I misunderstanding something?

Nominally, error_id was designed as one of the enumerated values in
mod_dav.h, but bleh... using apr_err works just fine.

Cheers,
-g

« Previous message in topic | 3 of 3 | Next message in topic »

Messages

Show all messages in topic

Re: svn commit: r35328 - in trunk/subversion/mod_dav_svn: . reports gstein Greg Stein 2009-01-21 00:54:37 PST
     Re: svn commit: r35328 - in trunk/subversion/mod_dav_svn: . reports cmpilato C. Michael Pilato 2009-01-21 08:41:33 PST
         Re: svn commit: r35328 - in trunk/subversion/mod_dav_svn: . reports gstein Greg Stein 2009-01-21 10:46:34 PST
Messages per page: