summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-14 09:32:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-14 11:05:59 +0200
commit48b9951779630da115086ce1fe8f4ffb5b0b4530 (patch)
treec5109374cb36b42099dc175e523d6233be240bf5 /connectivity
parentbba7ca803cfcb316882c5f32cd28f0aa0c67591b (diff)
loplugin:logexceptionnicely in configmgr..connectivity
Change-Id: I1cf8250dba63b744f882e54e9eb572884f292975 Reviewed-on: https://gerrit.libreoffice.org/74020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/Library_firebird_sdbc.mk1
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Blob.cxx5
-rw-r--r--connectivity/source/drivers/hsqldb/StorageFileAccess.cxx9
-rw-r--r--connectivity/source/drivers/writer/WConnection.cxx4
6 files changed, 15 insertions, 14 deletions
diff --git a/connectivity/Library_firebird_sdbc.mk b/connectivity/Library_firebird_sdbc.mk
index aa79db0693fe..e7aae8595604 100644
--- a/connectivity/Library_firebird_sdbc.mk
+++ b/connectivity/Library_firebird_sdbc.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Library_use_libraries,firebird_sdbc, \
salhelper \
utl \
svt \
+ tl \
vcl \
))
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 1e3f51ec00e2..4771e276e130 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -961,10 +961,10 @@ try
{
xNewProps->setPropertyValue(pResult->Name, xOldProps->getPropertyValue(pResult->Name));
}
- catch(IllegalArgumentException const & exc)
+ catch(IllegalArgumentException const &)
{
- SAL_WARN( "connectivity.commontools", "TransferFormComponentProperties : could not transfer the value for property \""
- << pResult->Name << "\" " << exc);
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "TransferFormComponentProperties : could not transfer the value for property \""
+ << pResult->Name << "\"");
}
}
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index ae32b27c38e2..f5d029738780 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -382,9 +382,9 @@ Any OPoolCollection::getNodeValue(const OUString& _rPath,const Reference<XInterf
aReturn = xHierarchyAccess->getByHierarchicalName(_rPath);
}
}
- catch(NoSuchElementException& e)
+ catch(const NoSuchElementException&)
{
- SAL_WARN("connectivity.cpool", e );
+ TOOLS_WARN_EXCEPTION("connectivity.cpool", "" );
}
return aReturn;
}
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 99497cbe6104..612618ab4580 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -19,6 +19,7 @@
#include <connectivity/dbexception.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::connectivity::firebird;
@@ -175,10 +176,10 @@ void SAL_CALL Blob::disposing()
{
closeBlob();
}
- catch (SQLException &e)
+ catch (const SQLException &)
{
// we cannot throw any exceptions here...
- SAL_WARN("connectivity.firebird", "isc_close_blob failed " << e);
+ TOOLS_WARN_EXCEPTION("connectivity.firebird", "isc_close_blob failed");
assert(false);
}
Blob_BASE::disposing();
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index a96309bc292c..756b2d008da9 100644
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -27,7 +27,7 @@
#include <hsqldb/HStorageMap.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
-
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::uno;
@@ -76,12 +76,11 @@ extern "C" SAL_JNI_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_S
catch(const NoSuchElementException&)
{
}
- catch(const Exception& e)
+ catch(const Exception&)
{
- OSL_FAIL("Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement");
+ TOOLS_WARN_EXCEPTION("connectivity.hsqldb", "forwarding");
if (env->ExceptionCheck())
env->ExceptionClear();
- SAL_WARN("connectivity.hsqldb", "forwarding Exception: " << e);
}
}
return JNI_FALSE;
@@ -117,7 +116,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
}
catch(const Exception& e)
{
- SAL_WARN("connectivity.hsqldb", "Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement " << e);
+ TOOLS_WARN_EXCEPTION("connectivity.hsqldb", "");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/writer/WConnection.cxx b/connectivity/source/drivers/writer/WConnection.cxx
index ea8ac5da225e..55517c51f3de 100644
--- a/connectivity/source/drivers/writer/WConnection.cxx
+++ b/connectivity/source/drivers/writer/WConnection.cxx
@@ -32,6 +32,7 @@
#include <unotools/pathoptions.hxx>
#include <connectivity/dbexception.hxx>
#include <cppuhelper/exc_hlp.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -137,8 +138,7 @@ uno::Reference<text::XTextDocument> const& OWriterConnection::acquireDoc()
OSL_VERIFY(aLoaderException >>= aLoaderError);
SAL_WARN("connectivity.writer",
- "empty m_xDoc, exception type: " << aLoaderException.getValueTypeName()
- << ", error message: " << aLoaderError);
+ "empty m_xDoc, " << exceptionToString(aLoaderException));
}
const OUString sError(m_aResources.getResourceStringWithSubstitution(