You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Jason Stewart <ja...@gmail.com> on 2006/09/25 12:16:57 UTC
Fatal error not resetting parseInProgress
Hey,
In the test suite code I've noticed that certain errors leave the
parser in a useless state, i.e. it will issue a ParseInProgress
exception if you call parse() again. It doesn't seem possible to reset
this either.
XercesDOMParser has a resetParse() method - but it is private, and so
not available to the test-suite.
SAXParser uses the Janitor to do cleanup - but I don't really
understand how it works - and it seems that exceptions bypass the
cleanup.
I haven't yet tried the DOMLSParser or the SAX2XMLReader - but I
imagine there are similar issues.
What should be done with parser objects after exceptions? Are they
unusable, and they must be re-allocated from scratch? Or is their a
public way to reset them?
Cheers, jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Fatal error not resetting parseInProgress
Posted by Jason Stewart <ja...@gmail.com>.
Hey David,
Done - XERCESC-1643 is all yours ;-)
Cheers, jas.
On 9/25/06, David Bertoni <db...@apache.org> wrote:
> Jason Stewart wrote:
> > Hey,
> >
> > In the test suite code I've noticed that certain errors leave the
> > parser in a useless state, i.e. it will issue a ParseInProgress
> > exception if you call parse() again. It doesn't seem possible to reset
> > this either.
> >
> > XercesDOMParser has a resetParse() method - but it is private, and so
> > not available to the test-suite.
> >
> > SAXParser uses the Janitor to do cleanup - but I don't really
> > understand how it works - and it seems that exceptions bypass the
> > cleanup.
> >
> > I haven't yet tried the DOMLSParser or the SAX2XMLReader - but I
> > imagine there are similar issues.
> >
> > What should be done with parser objects after exceptions? Are they
> > unusable, and they must be re-allocated from scratch? Or is their a
> > public way to reset them?
> >
>
> I think this is a bug, and that SAXParser et al. should reset anything they
> need to in their cleanup() member functions.
>
> Can you file a bug and assign it to me? It would be great if you could
> figure out which classes are broken, but only if you have the time.
>
> Thanks!
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Fatal error not resetting parseInProgress
Posted by David Bertoni <db...@apache.org>.
Jason Stewart wrote:
> Hey,
>
> In the test suite code I've noticed that certain errors leave the
> parser in a useless state, i.e. it will issue a ParseInProgress
> exception if you call parse() again. It doesn't seem possible to reset
> this either.
>
> XercesDOMParser has a resetParse() method - but it is private, and so
> not available to the test-suite.
>
> SAXParser uses the Janitor to do cleanup - but I don't really
> understand how it works - and it seems that exceptions bypass the
> cleanup.
>
> I haven't yet tried the DOMLSParser or the SAX2XMLReader - but I
> imagine there are similar issues.
>
> What should be done with parser objects after exceptions? Are they
> unusable, and they must be re-allocated from scratch? Or is their a
> public way to reset them?
>
I think this is a bug, and that SAXParser et al. should reset anything they
need to in their cleanup() member functions.
Can you file a bug and assign it to me? It would be great if you could
figure out which classes are broken, but only if you have the time.
Thanks!
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org