editeng/source/misc/svxacorr.cxx | 1 + sw/source/core/swg/SwXMLTextBlocks1.cxx | 28 ++++++++-------------------- 2 files changed, 9 insertions(+), 20 deletions(-)
New commits: commit f61f00862380fed99a09a11d67fef5d8efbce368 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Nov 20 11:32:54 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Nov 22 06:46:43 2019 +0100 log exceptions when parsing to make debugging easier Change-Id: Ia19384a925a2bb437fa5d961e6c3d44eebe0c6b6 Reviewed-on: https://gerrit.libreoffice.org/83345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 24ff88d8e725..48d6676b26f2 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2181,6 +2181,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() } catch ( const uno::Exception& ) { + TOOLS_WARN_EXCEPTION("editeng", "when loading " << sShareAutoCorrFile); } // Set time stamp diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 843e545a39a0..f4880417e929 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -23,6 +23,7 @@ #include <svl/macitem.hxx> #include <svtools/unoevent.hxx> #include <sfx2/docfile.hxx> +#include <tools/diagnose_ex.h> #include <unotools/streamwrap.hxx> #include <comphelper/fileformat.h> #include <comphelper/processfactory.hxx> @@ -400,11 +401,12 @@ ErrCode SwXMLTextBlocks::PutBlockText( const OUString& rShort, void SwXMLTextBlocks::ReadInfo() { - try - { const OUString sDocName( XMLN_BLOCKLIST ); - if ( xBlkRoot.is() && xBlkRoot->hasByName( sDocName ) && xBlkRoot->isStreamElement( sDocName ) ) + try { + if ( !xBlkRoot.is() || !xBlkRoot->hasByName( sDocName ) || !xBlkRoot->isStreamElement( sDocName ) ) + return; + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); @@ -425,26 +427,12 @@ void SwXMLTextBlocks::ReadInfo() xParser->setTokenHandler( xTokenHandler ); // parse - try - { - xParser->parseStream( aParserInput ); - } - catch( xml::sax::SAXParseException& ) - { - // re throw ? - } - catch( xml::sax::SAXException& ) - { - // re throw ? - } - catch( io::IOException& ) - { - // re throw ? - } - } + xParser->parseStream( aParserInput ); } catch ( uno::Exception& ) { + TOOLS_WARN_EXCEPTION("sw", "when loading " << sDocName); + // re throw ? } } void SwXMLTextBlocks::WriteInfo() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits