summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-07-11 20:49:33 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-07-11 20:51:18 +0100
commit9af1cbf233620e7c9d3fa9d8f55ab0e05dca6c84 (patch)
tree3d0d5dc974278acb79add01c964f86291653617f
parentdaf354fa7f2cf800a0661813ddf8d7c49c5c5f59 (diff)
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
-rw-r--r--sax/source/fastparser/fastparser.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 17e0213e8845..d3103d153dc5 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