summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 15:56:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-16 13:31:26 +0200
commit889dc7bffa02236bf2ad56b382997771f0fcf3c6 (patch)
treee7fc2c8748972bb1ed4acb98fd92ff08a8670f7b /unotools
parent9a97a26511584f41c3753fa9536e1c4a8dce637a (diff)
use more TOOLS_WARN_EXCEPTION
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/viewoptions.cxx43
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx47
2 files changed, 24 insertions, 66 deletions
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index b7cfc9e063c3..e72450d67186 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -157,11 +157,9 @@ SvtViewOptionsBase_Impl::SvtViewOptionsBase_Impl( const OUString& sList )
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
m_xRoot.clear();
m_xSet.clear();
-
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -212,9 +210,8 @@ bool SvtViewOptionsBase_Impl::Exists( const OUString& sName )
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
bExists = false;
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return bExists;
@@ -244,8 +241,7 @@ void SvtViewOptionsBase_Impl::Delete( const OUString& sName )
{ }
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -272,9 +268,8 @@ OUString SvtViewOptionsBase_Impl::GetWindowState( const OUString& sName )
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
sWindowState.clear();
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return sWindowState;
@@ -297,8 +292,7 @@ void SvtViewOptionsBase_Impl::SetWindowState( const OUString& sName ,
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -331,8 +325,7 @@ css::uno::Sequence< css::beans::NamedValue > SvtViewOptionsBase_Impl::GetUserDat
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
return css::uno::Sequence< css::beans::NamedValue >();
@@ -366,8 +359,7 @@ void SvtViewOptionsBase_Impl::SetUserData( const OUString&
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -394,9 +386,8 @@ css::uno::Any SvtViewOptionsBase_Impl::GetUserItem( const OUString& sName ,
{ aItem.clear(); }
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
aItem.clear();
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return aItem;
@@ -428,8 +419,7 @@ void SvtViewOptionsBase_Impl::SetUserItem( const OUString& sName ,
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -450,8 +440,7 @@ OString SvtViewOptionsBase_Impl::GetPageID( const OUString& sName )
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
return sID.toUtf8();
@@ -474,8 +463,7 @@ void SvtViewOptionsBase_Impl::SetPageID( const OUString& sName ,
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -502,8 +490,7 @@ SvtViewOptionsBase_Impl::State SvtViewOptionsBase_Impl::GetVisible( const OUStri
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
return eState;
@@ -526,8 +513,7 @@ void SvtViewOptionsBase_Impl::SetVisible( const OUString& sName ,
}
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
}
}
@@ -559,9 +545,8 @@ css::uno::Reference< css::uno::XInterface > SvtViewOptionsBase_Impl::impl_getSet
{ xNode.clear(); }
catch(const css::uno::Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
+ TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception");
xNode.clear();
- SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return xNode;
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index a411870827a6..7916259f1919 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -97,10 +97,7 @@ std::vector<OUString> getContents(OUString const & url) {
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "getContents(" << url << ") " << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "getContents(" << url << ")");
return std::vector<OUString>();
}
}
@@ -144,11 +141,7 @@ bool utl::UCBContentHelper::IsDocument(OUString const & url) {
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "UCBContentHelper::IsDocument(" << url << ") "
- << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "UCBContentHelper::IsDocument(" << url << ")");
return false;
}
}
@@ -164,11 +157,7 @@ css::uno::Any utl::UCBContentHelper::GetProperty(
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "UCBContentHelper::GetProperty(" << url << ", " << property << ") "
- << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "UCBContentHelper::GetProperty(" << url << ", " << property << ")");
return css::uno::Any();
}
}
@@ -182,11 +171,7 @@ bool utl::UCBContentHelper::IsFolder(OUString const & url) {
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "UCBContentHelper::IsFolder(" << url << ") "
- << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "UCBContentHelper::IsFolder(" << url << ")");
return false;
}
}
@@ -203,11 +188,7 @@ bool utl::UCBContentHelper::GetTitle(
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "UCBContentHelper::GetTitle(" << url << ") "
- << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "UCBContentHelper::GetTitle(" << url << ")");
return false;
}
}
@@ -224,11 +205,7 @@ bool utl::UCBContentHelper::Kill(OUString const & url) {
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
- "unotools.ucbhelper",
- "UCBContentHelper::Kill(" << url << ") "
- << exceptionToString(e));
+ TOOLS_INFO_EXCEPTION("unotools.ucbhelper", "UCBContentHelper::Kill(" << url << ")");
return false;
}
}
@@ -310,11 +287,9 @@ bool utl::UCBContentHelper::IsYounger(
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
+ TOOLS_INFO_EXCEPTION(
"unotools.ucbhelper",
- "UCBContentHelper::IsYounger(" << younger << ", " << older << ") "
- << exceptionToString(e));
+ "UCBContentHelper::IsYounger(" << younger << ", " << older << ")");
return false;
}
}
@@ -394,11 +369,9 @@ bool utl::UCBContentHelper::IsSubPath(
assert(false && "this cannot happen");
throw;
} catch (css::uno::Exception const &) {
- css::uno::Any e(cppu::getCaughtException());
- SAL_INFO(
+ TOOLS_INFO_EXCEPTION(
"unotools.ucbhelper",
- "UCBContentHelper::IsSubPath(" << parent << ", " << child << ") "
- << exceptionToString(e));
+ "UCBContentHelper::IsSubPath(" << parent << ", " << child << ")");
}
return false;
}