[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sax/source
Michael Meeks
michael.meeks at collabora.com
Sun Jul 13 13:21:29 PDT 2014
sax/source/fastparser/fastparser.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 7cd2871b594ff49267b1fe8c3100e1ca717928c6
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Jul 11 20:49:33 2014 +0100
fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.
Not an ideal solution; ideally we should not throw the exceptions,
and stop the parser as soon as something bad like this happens; but
hopefully exception throwing is reasonable exceptional.
Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54
Reviewed-on: https://gerrit.libreoffice.org/10242
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 17e0213..d3103d1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -607,12 +607,11 @@ void Entity::throwException( const ::rtl::Reference< FastLocatorImpl > &xDocumen
// the consuming thread.
void Entity::saveException( const Exception &e )
{
- // only store the first exception
- if( !maSavedException.hasValue() )
- {
- maSavedException <<= e;
- XML_StopParser( mpParser, /* resumable? */ XML_FALSE );
- }
+ // fdo#81214 - allow the parser to run on after an exception,
+ // unexpectedly some 'startElements' produce an UNO_QUERY_THROW
+ // for XComponent; and yet expect to continue parsing.
+ SAL_WARN("sax", "Unexpected exception from XML parser " << e.Message);
+ maSavedException <<= e;
}
} // namespace
More information about the Libreoffice-commits
mailing list