summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 16:21:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-04 15:18:00 +0200
commit2c05d758b2b62c9df413e2514fb3cd233d0f3ec7 (patch)
treee0a23d3da6fb17ae97d18957fc14f4a4a8de2d3f /unotools
parenta3088b1e72ef17babe3d3664c610afd02cfe0891 (diff)
add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/configitem.cxx45
-rw-r--r--unotools/source/config/historyoptions.cxx18
-rw-r--r--unotools/source/config/itemholder1.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx2
-rw-r--r--unotools/source/config/useroptions.cxx6
-rw-r--r--unotools/source/i18n/calendarwrapper.cxx42
-rw-r--r--unotools/source/i18n/charclass.cxx4
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx20
-rw-r--r--unotools/source/i18n/transliterationwrapper.cxx8
-rw-r--r--unotools/source/misc/mediadescriptor.cxx19
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx20
11 files changed, 84 insertions, 102 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index d0d17510ebe4..80d18841299e 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -423,7 +423,7 @@ Sequence< Any > ConfigItem::GetProperties(const Sequence< OUString >& rNames)
"unotools.config",
"ignoring XHierarchicalNameAccess to /org.openoffice."
<< sSubTree << "/" << pNames[i] << " Exception: "
- << rEx.Message);
+ << rEx);
}
}
@@ -503,7 +503,7 @@ bool ConfigItem::PutProperties( const Sequence< OUString >& rNames,
{
SAL_WARN(
"unotools.config",
- "Exception from PutProperties: " << e.Message);
+ "Exception from PutProperties: " << e);
}
}
try
@@ -515,7 +515,7 @@ bool ConfigItem::PutProperties( const Sequence< OUString >& rNames,
{
SAL_WARN(
"unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ "Exception from commitChanges(): " << e);
}
}
@@ -645,7 +645,7 @@ Sequence< OUString > ConfigItem::GetNodeNames(const OUString& rNode, ConfigNameF
{
SAL_WARN(
"unotools.config",
- "Exception from GetNodeNames: " << e.Message);
+ "Exception from GetNodeNames: " << e);
}
}
return aRet;
@@ -683,7 +683,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode)
{
SAL_WARN(
"unotools.config",
- "Exception from removeByName(): " << e.Message);
+ "Exception from removeByName(): " << e);
}
}
xBatch->commitChanges();
@@ -691,8 +691,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode)
}
catch (css::uno::Exception & e)
{
- SAL_WARN(
- "unotools.config", "Exception from ClearNodeSet" << e.Message);
+ SAL_WARN("unotools.config", "Exception from ClearNodeSet" << e);
}
}
return bRet;
@@ -731,7 +730,7 @@ bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString > c
{
SAL_WARN(
"unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ "Exception from commitChanges(): " << e);
}
bRet = true;
}
@@ -739,7 +738,7 @@ bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString > c
{
SAL_WARN(
"unotools.config",
- "Exception from GetNodeNames: " << e.Message);
+ "Exception from GetNodeNames: " << e);
}
}
return bRet;
@@ -829,7 +828,7 @@ bool ConfigItem::SetSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ "Exception from commitChanges(): " << e);
}
const PropertyValue* pProperties = rValues.getConstArray();
@@ -870,8 +869,7 @@ bool ConfigItem::SetSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception form insert/replaceByName(): "
- << e.Message);
+ "Exception form insert/replaceByName(): " << e);
}
}
xBatch->commitChanges();
@@ -881,7 +879,7 @@ bool ConfigItem::SetSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception from SetSetProperties: " << rEx.Message);
+ "Exception from SetSetProperties: " << rEx);
bRet = false;
}
}
@@ -961,7 +959,7 @@ bool ConfigItem::ReplaceSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ "Exception from commitChanges(): " << e);
}
}
@@ -982,7 +980,7 @@ bool ConfigItem::ReplaceSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ "Exception from commitChanges(): " << e);
}
const PropertyValue* pProperties = rValues.getConstArray();
@@ -1021,8 +1019,7 @@ bool ConfigItem::ReplaceSetProperties(
{
SAL_WARN(
"unotools.config",
- "Exception from insert/replaceByName(): "
- << e.Message);
+ "Exception from insert/replaceByName(): " << e);
}
}
xBatch->commitChanges();
@@ -1031,8 +1028,7 @@ bool ConfigItem::ReplaceSetProperties(
catch (const Exception& rEx)
{
SAL_WARN(
- "unotools.config",
- "Exception from ReplaceSetProperties: " << rEx.Message);
+ "unotools.config", "Exception from ReplaceSetProperties: " << rEx);
bRet = false;
}
}
@@ -1076,9 +1072,7 @@ bool ConfigItem::AddNode(const OUString& rNode, const OUString& rNewNode)
}
catch (css::uno::Exception & e)
{
- SAL_WARN(
- "unotools.config",
- "Exception from commitChanges(): " << e.Message);
+ SAL_WARN("unotools.config", "Exception from commitChanges(): " << e);
}
}
else
@@ -1091,17 +1085,14 @@ bool ConfigItem::AddNode(const OUString& rNode, const OUString& rNewNode)
}
catch (css::uno::Exception & e)
{
- SAL_WARN(
- "unotools.config",
- "Exception from AddNode(): " << e.Message);
+ SAL_WARN("unotools.config", "Exception from AddNode(): " << e);
}
}
xBatch->commitChanges();
}
catch (const Exception& rEx)
{
- SAL_WARN(
- "unotools.config", "Exception from AddNode(): " << rEx.Message);
+ SAL_WARN("unotools.config", "Exception from AddNode(): " << rEx);
bRet = false;
}
}
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index b4213295c142..e12403f77784 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -117,7 +117,7 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl()
m_xCfg.clear();
m_xCommonXCU.clear();
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -148,7 +148,7 @@ sal_uInt32 SvtHistoryOptions_Impl::GetCapacity(EHistoryType eHistory)
}
catch (const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
return nSize;
@@ -176,7 +176,7 @@ uno::Reference<container::XNameAccess> SvtHistoryOptions_Impl::GetListAccess(EHi
}
catch (const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
return xListAccess;
@@ -215,7 +215,7 @@ void SvtHistoryOptions_Impl::impl_truncateList(EHistoryType eHistory, sal_uInt32
}
catch(const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -248,7 +248,7 @@ void SvtHistoryOptions_Impl::Clear( EHistoryType eHistory )
}
catch(const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -276,7 +276,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
}
catch(const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
const sal_Int32 nLength = xOrderList->getElementNames().getLength();
@@ -310,7 +310,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
// ignore such corrupted individual items here, so that at
// least newly added items are successfully reported back
// from this function:
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
assert(nCount <= nLength);
@@ -444,7 +444,7 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
}
catch(const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -508,7 +508,7 @@ void SvtHistoryOptions_Impl::DeleteItem(EHistoryType eHistory, const OUString& s
}
catch (const uno::Exception& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index a11fd059fead..f3dfcc98af5e 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -64,7 +64,7 @@ ItemHolder1::ItemHolder1()
if(bMessage)
{
bMessage = false;
- SAL_WARN( "unotools", "CreateInstance with arguments exception: " << rEx.Message);
+ SAL_WARN( "unotools", "CreateInstance with arguments exception: " << rEx);
}
}
#else
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 6bdc59f93c4d..998ff53d0072 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -298,7 +298,7 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Paths ePath, const OUString&
}
catch (const Exception& e)
{
- SAL_WARN("unotools.config", "SetPath: exception: " << e.Message);
+ SAL_WARN("unotools.config", "SetPath: " << e);
}
}
}
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 625a925b4095..31ce8c9893d0 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -147,7 +147,7 @@ SvtUserOptions::Impl::Impl() :
catch (uno::Exception const& ex)
{
m_xCfg.clear();
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -161,7 +161,7 @@ OUString SvtUserOptions::Impl::GetToken (UserOptToken nToken) const
}
catch (uno::Exception const& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
return sToken;
}
@@ -176,7 +176,7 @@ void SvtUserOptions::Impl::SetToken (UserOptToken nToken, OUString const& sToken
}
catch (uno::Exception const& ex)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex.Message);
+ SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx
index 086ae57a661c..98e765104a3a 100644
--- a/unotools/source/i18n/calendarwrapper.cxx
+++ b/unotools/source/i18n/calendarwrapper.cxx
@@ -49,7 +49,7 @@ void CalendarWrapper::loadDefaultCalendar( const css::lang::Locale& rLocale )
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "loadDefaultCalendar: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "loadDefaultCalendar: Exception caught " << e );
}
}
@@ -63,7 +63,7 @@ void CalendarWrapper::loadCalendar( const OUString& rUniqueID, const css::lang::
catch (const Exception& e)
{
SAL_WARN( "unotools.i18n", "loadCalendar: Exception caught requested: "
- << rUniqueID << " Locale: " << rLocale.Language << "_" << rLocale.Country << " " << e.Message );
+ << rUniqueID << " Locale: " << rLocale.Language << "_" << rLocale.Country << " " << e );
}
}
@@ -76,7 +76,7 @@ css::uno::Sequence< OUString > CalendarWrapper::getAllCalendars( const css::lang
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getAllCalendars: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getAllCalendars: Exception caught " << e );
}
return css::uno::Sequence< OUString > (0);
@@ -91,7 +91,7 @@ OUString CalendarWrapper::getUniqueID() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getUniqueID: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getUniqueID: Exception caught " << e );
}
return OUString();
}
@@ -105,7 +105,7 @@ void CalendarWrapper::setDateTime( double fTimeInDays )
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "setDateTime: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "setDateTime: Exception caught " << e );
}
}
@@ -118,7 +118,7 @@ double CalendarWrapper::getDateTime() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getDateTime: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getDateTime: Exception caught " << e );
}
return 0.0;
}
@@ -134,7 +134,7 @@ void CalendarWrapper::setLocalDateTime( double fTimeInDays )
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "setLocalDateTime: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "setLocalDateTime: Exception caught " << e );
}
}
@@ -149,7 +149,7 @@ double CalendarWrapper::getLocalDateTime() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getLocalDateTime: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getLocalDateTime: Exception caught " << e );
}
return 0.0;
}
@@ -163,7 +163,7 @@ void CalendarWrapper::setValue( sal_Int16 nFieldIndex, sal_Int16 nValue )
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "setValue: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "setValue: Exception caught " << e );
}
}
@@ -176,7 +176,7 @@ bool CalendarWrapper::isValid() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "isValid: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "isValid: Exception caught " << e );
}
return false;
}
@@ -190,7 +190,7 @@ sal_Int16 CalendarWrapper::getValue( sal_Int16 nFieldIndex ) const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getValue: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getValue: Exception caught " << e );
}
return 0;
}
@@ -204,7 +204,7 @@ sal_Int16 CalendarWrapper::getFirstDayOfWeek() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getFirstDayOfWeek: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getFirstDayOfWeek: Exception caught " << e );
}
return 0;
}
@@ -218,7 +218,7 @@ sal_Int16 CalendarWrapper::getNumberOfMonthsInYear() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getNumberOfMonthsInYear: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getNumberOfMonthsInYear: Exception caught " << e );
}
return 0;
}
@@ -232,7 +232,7 @@ sal_Int16 CalendarWrapper::getNumberOfDaysInWeek() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getNumberOfDaysInWeek: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getNumberOfDaysInWeek: Exception caught " << e );
}
return 0;
}
@@ -246,7 +246,7 @@ css::uno::Sequence< css::i18n::CalendarItem2 > CalendarWrapper::getMonths() cons
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getMonths: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getMonths: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::CalendarItem2 > (0);
}
@@ -260,7 +260,7 @@ css::uno::Sequence< css::i18n::CalendarItem2 > CalendarWrapper::getDays() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getDays: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getDays: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::CalendarItem2 > (0);
}
@@ -274,7 +274,7 @@ OUString CalendarWrapper::getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_I
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getDisplayName: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getDisplayName: Exception caught " << e );
}
return OUString();
}
@@ -290,7 +290,7 @@ OUString CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getDisplayString: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getDisplayString: Exception caught " << e );
}
return OUString();
}
@@ -306,7 +306,7 @@ css::i18n::Calendar2 CalendarWrapper::getLoadedCalendar() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getLoadedCalendar2: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getLoadedCalendar2: Exception caught " << e );
}
return css::i18n::Calendar2();
}
@@ -320,7 +320,7 @@ css::uno::Sequence< css::i18n::CalendarItem2 > CalendarWrapper::getGenitiveMonth
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getGenitiveMonths: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getGenitiveMonths: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::CalendarItem2 > (0);
}
@@ -334,7 +334,7 @@ css::uno::Sequence< css::i18n::CalendarItem2 > CalendarWrapper::getPartitiveMont
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getPartitiveMonths: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getPartitiveMonths: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::CalendarItem2 > (0);
}
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx
index 60e5227070a9..8cdabfcd0f9d 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -404,7 +404,7 @@ css::i18n::ParseResult CharClass::parseAnyToken(
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "parseAnyToken: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "parseAnyToken: Exception caught " << e );
return ParseResult();
}
}
@@ -429,7 +429,7 @@ css::i18n::ParseResult CharClass::parsePredefinedToken(
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "parsePredefinedToken: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "parsePredefinedToken: Exception caught " << e );
return ParseResult();
}
}
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 1750a9b23bc5..09e5c186f517 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -168,7 +168,7 @@ css::i18n::LanguageCountryInfo LocaleDataWrapper::getLanguageCountryInfo() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getLanguageCountryInfo: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getLanguageCountryInfo: Exception caught " << e );
}
return css::i18n::LanguageCountryInfo();
}
@@ -195,7 +195,7 @@ const css::i18n::LocaleDataItem& LocaleDataWrapper::getLocaleItem() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getLocaleItem: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getLocaleItem: Exception caught " << e );
}
static css::i18n::LocaleDataItem aEmptyItem;
return aEmptyItem;
@@ -209,7 +209,7 @@ css::uno::Sequence< css::i18n::Currency2 > LocaleDataWrapper::getAllCurrencies()
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getAllCurrencies: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getAllCurrencies: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::Currency2 >(0);
}
@@ -222,7 +222,7 @@ css::uno::Sequence< css::i18n::FormatElement > LocaleDataWrapper::getAllFormats(
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getAllFormats: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getAllFormats: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::FormatElement >(0);
}
@@ -235,7 +235,7 @@ css::i18n::ForbiddenCharacters LocaleDataWrapper::getForbiddenCharacters() const
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getForbiddenCharacters: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getForbiddenCharacters: Exception caught " << e );
}
return css::i18n::ForbiddenCharacters();
}
@@ -248,7 +248,7 @@ css::uno::Sequence< OUString > LocaleDataWrapper::getReservedWord() const
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "getReservedWord: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getReservedWord: Exception caught " << e );
}
return css::uno::Sequence< OUString >(0);
}
@@ -266,7 +266,7 @@ css::uno::Sequence< css::lang::Locale > LocaleDataWrapper::getAllInstalledLocale
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "getAllInstalledLocaleNames: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getAllInstalledLocaleNames: Exception caught " << e );
}
return rInstalledLocales;
}
@@ -1821,7 +1821,7 @@ css::uno::Sequence< css::i18n::Calendar2 > LocaleDataWrapper::getAllCalendars()
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getAllCalendars: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getAllCalendars: Exception caught " << e );
}
return css::uno::Sequence< css::i18n::Calendar2 >(0);
}
@@ -1845,7 +1845,7 @@ css::uno::Sequence< OUString > LocaleDataWrapper::getDateAcceptancePatterns() co
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "getDateAcceptancePatterns: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "getDateAcceptancePatterns: Exception caught " << e );
}
return css::uno::Sequence< OUString >(0);
}
@@ -1865,7 +1865,7 @@ void LocaleDataWrapper::setDateAcceptancePatterns(
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "setDateAcceptancePatterns: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "setDateAcceptancePatterns: Exception caught " << e );
}
if (!rPatterns.getLength())
return; // just a reset
diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx
index d2d037a482f2..4a65f801cfba 100644
--- a/unotools/source/i18n/transliterationwrapper.cxx
+++ b/unotools/source/i18n/transliterationwrapper.cxx
@@ -148,7 +148,7 @@ void TransliterationWrapper::loadModuleImpl() const
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "loadModuleImpl: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "loadModuleImpl: Exception caught " << e );
}
bFirstCall = false;
@@ -169,7 +169,7 @@ void TransliterationWrapper::loadModuleByImplName(const OUString& rModuleName,
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "loadModuleByImplName: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "loadModuleByImplName: Exception caught " << e );
}
bFirstCall = false;
@@ -188,7 +188,7 @@ bool TransliterationWrapper::equals(
}
catch ( const Exception& e )
{
- SAL_WARN( "unotools.i18n", "equals: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "equals: Exception caught " << e );
}
return false;
}
@@ -204,7 +204,7 @@ sal_Int32 TransliterationWrapper::compareString( const OUString& rStr1, const OU
}
catch (const Exception& e)
{
- SAL_WARN( "unotools.i18n", "compareString: Exception caught " << e.Message );
+ SAL_WARN( "unotools.i18n", "compareString: Exception caught " << e );
}
return 0;
}
diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx
index 1e37fe199cad..b9b4610012c3 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -521,9 +521,7 @@ bool MediaDescriptor::impl_addInputStream( bool bLockFile )
}
catch(const css::uno::Exception& ex)
{
- SAL_WARN(
- "unotools.misc",
- "invalid MediaDescriptor detected: " << ex.Message);
+ SAL_WARN("unotools.misc", "invalid MediaDescriptor detected: " << ex);
return false;
}
}
@@ -632,17 +630,13 @@ bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, bool bLockFi
{ throw; }
catch(const css::ucb::ContentCreationException& e)
{
- SAL_WARN(
- "unotools.misc",
- "caught ContentCreationException \"" << e.Message
+ SAL_WARN("unotools.misc", "caught \"" << e
<< "\" while opening <" << sURL << ">");
return false; // TODO error handling
}
catch(const css::uno::Exception& e)
{
- SAL_WARN(
- "unotools.misc",
- "caught Exception \"" << e.Message << "\" while opening <"
+ SAL_WARN("unotools.misc", "caught \"" << e << "\" while opening <"
<< sURL << ">");
return false; // TODO error handling
}
@@ -683,9 +677,7 @@ bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, bool bLockFi
// break this method.
if (!pInteraction->wasWriteError() || bModeRequestedExplicitly)
{
- SAL_WARN(
- "unotools.misc",
- "caught Exception \"" << e.Message
+ SAL_WARN("unotools.misc", "caught \"" << e
<< "\" while opening <" << sURL << ">");
// If the protocol is webdav, then we need to treat the stream as readonly, even if the
// operation was requested as read/write explicitly (the WebDAV UCB implementation is monodirectional
@@ -751,8 +743,7 @@ bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, bool bLockFi
{
SAL_INFO(
"unotools.misc",
- "caught Exception \"" << e.Message << "\" while opening <"
- << sURL << ">");
+ "caught " << e << " while opening <" << sURL << ">");
return false;
}
}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 417a70bba7d6..0cded08d91b9 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -103,7 +103,7 @@ std::vector<OUString> getContents(OUString const & url) {
SAL_INFO(
"unotools.ucbhelper",
"getContents(" << url << ") " << e.getValueType().getTypeName()
- << " \"" << e.get<css::uno::Exception>().Message << '"');
+ << " \"" << e.get<css::uno::Exception>() << '"');
return std::vector<OUString>();
}
}
@@ -152,7 +152,7 @@ bool utl::UCBContentHelper::IsDocument(OUString const & url) {
"unotools.ucbhelper",
"UCBContentHelper::IsDocument(" << url << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return false;
}
}
@@ -173,7 +173,7 @@ css::uno::Any utl::UCBContentHelper::GetProperty(
"unotools.ucbhelper",
"UCBContentHelper::GetProperty(" << url << ", " << property << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return css::uno::Any();
}
}
@@ -192,7 +192,7 @@ bool utl::UCBContentHelper::IsFolder(OUString const & url) {
"unotools.ucbhelper",
"UCBContentHelper::IsFolder(" << url << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return false;
}
}
@@ -214,7 +214,7 @@ bool utl::UCBContentHelper::GetTitle(
"unotools.ucbhelper",
"UCBContentHelper::GetTitle(" << url << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return false;
}
}
@@ -236,7 +236,7 @@ bool utl::UCBContentHelper::Kill(OUString const & url) {
"unotools.ucbhelper",
"UCBContentHelper::Kill(" << url << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return false;
}
}
@@ -276,7 +276,7 @@ bool utl::UCBContentHelper::MakeFolder(
SAL_INFO(
"unotools.ucbhelper",
"UCBContentHelper::MakeFolder(" << title
- << ") InteractiveIOException \"" << e.Message
+ << ") InteractiveIOException \"" << e
<< "\", code " << + (sal_Int32)e.Code);
}
} catch (css::ucb::NameClashException const &) {
@@ -292,7 +292,7 @@ bool utl::UCBContentHelper::MakeFolder(
"unotools.ucbhelper",
"UCBContentHelper::MakeFolder(" << title << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
}
if (exists) {
INetURLObject o(parent.getURL());
@@ -328,7 +328,7 @@ bool utl::UCBContentHelper::IsYounger(
"unotools.ucbhelper",
"UCBContentHelper::IsYounger(" << younger << ", " << older << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
return false;
}
}
@@ -420,7 +420,7 @@ bool utl::UCBContentHelper::IsSubPath(
"unotools.ucbhelper",
"UCBContentHelper::IsSubPath(" << parent << ", " << child << ") "
<< e.getValueType().getTypeName() << " \""
- << e.get<css::uno::Exception>().Message << '"');
+ << e.get<css::uno::Exception>() << '"');
}
return false;
}