diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-01-18 10:16:14 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-01-19 07:02:09 +0000 |
commit | 18ae77a065cb8ae6940d4067f6ab7e99a3f74047 (patch) | |
tree | c964a7e45fb26ec41475b3cee7454d9c7ced21bb /sax | |
parent | tdf#104718: Prompt user to continue on SAXException (diff) | |
download | core-18ae77a065cb8ae6940d4067f6ab7e99a3f74047.tar.gz core-18ae77a065cb8ae6940d4067f6ab7e99a3f74047.zip |
Also consider saved exceptions when mbEnableThreads is true
Previously, saved exceptions are only checked in FastSaxParserImpl::parse(),
which is used in case mbEnableThreads is false (when data in input stream
is no more than 10000). This patch also enables the same check for the
other case.
Change-Id: Ie718556b7c01322e30698515ecd331b7ebad4105
Reviewed-on: https://gerrit.libreoffice.org/33249
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 03ea471d225b..420f8c79ce2e 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -811,6 +811,10 @@ void FastSaxParserImpl::parseStream(const InputSource& maStructSource) } while (!done); xParser->join(); deleteUsedEvents(); + + // callbacks used inside XML_Parse may have caught an exception + if( rEntity.maSavedException.hasValue() ) + rEntity.throwException( mxDocumentLocator, true ); } else { |