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

Re: Problems with 0.31.0

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2003-10-08 15:53:30 CEST

Joe Orton <jorton@redhat.com> writes:

> If I understand this correctly: the issue is that ra_dav needs to be
> able to distinguish between an error from the XML parser itself and an
> error which occurs when ra_dav's SAX callbacks return a <0 value.
> There's never been a way to do this in the neon API, though it's a
> definitely a reasonable feature to have.

Well, actually, there *was* a way to do it (because we were doing it),
though it may not have been a documented API feature. We used to
never call ne_xml_valid(), and always check ne_xml_get_error(). If
that returned NULL or empty string, we knew (for loose definitions of
"knew") that no XML parser error had happened. We can't do that
anymore because ne_xml_get_error() always returns some non-empty

We could continue to do this if Neon promised to leave its own
p->error member NULL unless ne_xml_set_error() was called, or unless
some real error occured.


I just realized something.[1]

> I'd recommend limiting SVN to using 0.24.[0-2] and working out how
> to add this to neon rather than performing major surgery on ra_dav
> (I expect the latter would be more work than the former).

I have no problems with this. I was able to get the tests to pass
over ra_dav with not too many mods, but overall I don't have 100% that
those mods encompass the spirit of what we want to accomplish. The
system is complicated because Neon has it own errors that happen,
there are true XML parser errors (malformed, etc.), there are errors
that occur when the XML callbacks go off to do other things
(svn_error_t's), and there are errors marshaled through the XML
responses themselves from mod_dav_svn.


[1] While typing the above, I realize that I could fix this problem
in one line of code. I simply needed to call:

   ne_xml_set_error(success_parser, "");

before dispatching the request. This overrides the "Unknown error"
initialization that was added in 0.24.3, and should work just fine
with 0.24.2, also. It's a bit hacky, but it will buy us some time
(letting folks upgrade to 0.24.3, if only so it builds in Windows)
while we solve the larger error handling issue.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 8 15:54:43 2003

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.