[Libreoffice-commits] core.git: compilerplugins/clang writerperfect/source xmlscript/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 20 08:40:05 UTC 2019


 compilerplugins/clang/logexceptionnicely.cxx        |    2 -
 writerperfect/source/writer/MSWorksImportFilter.cxx |    5 ++-
 xmlscript/source/xmlflat_imexp/xmlbas_export.cxx    |   17 ++++++-----
 xmlscript/source/xmlflat_imexp/xmlbas_import.cxx    |   29 ++++++++++----------
 4 files changed, 28 insertions(+), 25 deletions(-)

New commits:
commit ef73fefd023372ec0157683ed9ab349ff551a67c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Jun 9 13:48:35 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 20 10:38:48 2019 +0200

    loplugin:logexceptionnicely in various
    
    Change-Id: I207d21e674366046e2663ebaf7f5161cde2c5fab
    Reviewed-on: https://gerrit.libreoffice.org/74336
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/logexceptionnicely.cxx b/compilerplugins/clang/logexceptionnicely.cxx
index efcf7060bf70..b6f7ef8bb31d 100644
--- a/compilerplugins/clang/logexceptionnicely.cxx
+++ b/compilerplugins/clang/logexceptionnicely.cxx
@@ -129,7 +129,7 @@ public:
     }
 };
 
-static Plugin::Registration<LogExceptionNicely> X("logexceptionnicely", false);
+static Plugin::Registration<LogExceptionNicely> X("logexceptionnicely");
 
 } // namespace
 
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index dcef9c2df10b..733364b91211 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -12,6 +12,7 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/awt/XWindow.hpp>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <libwps/libwps.h>
 
@@ -83,9 +84,9 @@ bool MSWorksImportFilter::doImportDocument(weld::Window* pParent,
                 return false;
         }
     }
-    catch (css::uno::Exception& e)
+    catch (css::uno::Exception&)
     {
-        SAL_WARN("writerperfect", "ignoring " << e);
+        TOOLS_WARN_EXCEPTION("writerperfect", "ignoring");
     }
     return libwps::WPS_OK
            == libwps::WPSDocument::parse(&rInput, &rGenerator, "", fileEncoding.c_str());
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 74db5079a8cc..02a1f900e390 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/xml/sax/SAXException.hpp>
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::lang;
@@ -294,24 +295,24 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
                 m_xHandler->endDocument();
             }
         }
-        catch ( const container::NoSuchElementException& e )
+        catch ( const container::NoSuchElementException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught NoSuchElementException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "XMLBasicExporterBase::filter" );
             bReturn = false;
         }
-        catch ( const lang::IllegalArgumentException& e )
+        catch ( const lang::IllegalArgumentException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught IllegalArgumentException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "XMLBasicExporterBase::filter" );
             bReturn = false;
         }
-        catch ( const lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught WrappedTargetException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "XMLBasicExporterBase::filter:" );
             bReturn = false;
         }
-        catch ( const xml::sax::SAXException& e )
+        catch ( const xml::sax::SAXException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught SAXException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "XMLBasicExporterBase::filter:" );
             bReturn = false;
         }
 
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 9a143c6567e1..4c7b4bf39876 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -30,6 +30,7 @@
 #include <com/sun/star/xml/sax/SAXException.hpp>
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::lang;
@@ -174,13 +175,13 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
                         if ( xLib.is() )
                             xElement.set( new BasicElementBase( rLocalName, xAttributes, this, m_xImport.get() ) );
                     }
-                    catch ( const container::ElementExistException& e )
+                    catch ( const container::ElementExistException& )
                     {
-                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: caught ElementExceptionExist reason " << e );
+                        TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement" );
                     }
-                    catch ( const lang::IllegalArgumentException& e )
+                    catch ( const lang::IllegalArgumentException& )
                     {
-                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason " << e );
+                        TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement" );
                     }
                 }
             }
@@ -214,9 +215,9 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
                         if ( xLib.is() )
                             xElement.set( new BasicEmbeddedLibraryElement( rLocalName, xAttributes, this, m_xImport.get(), m_xLibContainer, aName, bReadOnly ) );
                     }
-                    catch ( const lang::IllegalArgumentException& e )
+                    catch ( const lang::IllegalArgumentException& )
                     {
-                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason " << e );
+                        TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement" );
                     }
                 }
             }
@@ -250,9 +251,9 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
             if ( m_xLibContainer.is() && m_xLibContainer->hasByName( m_aLibName ) )
                 m_xLibContainer->getByName( m_aLibName ) >>= m_xLib;
         }
-        catch ( const lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "BasicEmbeddedLibraryElement CTOR: caught WrappedTargetException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicEmbeddedLibraryElement::CTOR:" );
         }
     }
 
@@ -370,17 +371,17 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
                 m_xLib->insertByName( m_aName, aElement );
             }
         }
-        catch ( const container::ElementExistException& e )
+        catch ( const container::ElementExistException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught ElementExceptionExist reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicSourceCodeElement::endElement" );
         }
-        catch ( const lang::IllegalArgumentException& e )
+        catch ( const lang::IllegalArgumentException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught IllegalArgumentException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicSourceCodeElement::endElement" );
         }
-        catch ( const lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& )
         {
-            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught WrappedTargetException reason " << e );
+            TOOLS_INFO_EXCEPTION("xmlscript.xmlflat", "BasicSourceCodeElement::endElement" );
         }
     }
 


More information about the Libreoffice-commits mailing list