summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-12 17:49:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-12 17:51:27 +0200
commit8c8492892b68a010e55d4d19a89425cf7d98814d (patch)
treee07180274f4d52d845374a9d19e3ce91a7012cbe /filter
parent3357115adf0e5c43b8ba6c03e9a181aafd1dc0f6 (diff)
Better error reporting
(The MESSAGE_CORRUPTED_FILTERCONFIG in the exception's Message would not be seen by end-users anyway, so better put something more useful in there.) Change-Id: I5c677a894a8b6fcfb61d24c59d45b2cbc53e7a60
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/filtercache.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index e9dc2cf0e088..36f97e5cfc43 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -67,13 +67,6 @@ namespace filter{
namespace css = ::com::sun::star;
-
-// Error message in case filter config seems to be corrupted.
-// Note: Dont tell user something about "setup -repair"!
-// Its no longer supported by using native installers ...
-const char MESSAGE_CORRUPTED_FILTERCONFIG[] =
- "The filter configuration appears to be defective. Please install the office suite again.";
-
FilterCache::FilterCache()
: BaseLock ( )
, m_xSMGR (::comphelper::getProcessServiceFactory())
@@ -1006,7 +999,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
catch(const css::uno::Exception& ex)
{
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration, caught: " + ex.Message,
css::uno::Reference< css::uno::XInterface >(),
ex.Message);
}
@@ -1051,7 +1044,7 @@ void FilterCache::impl_validateAndOptimize()
)
{
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration: the list of types or filters is empty",
css::uno::Reference< css::uno::XInterface >(),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The list of types or filters is empty." )));
}
@@ -1315,7 +1308,7 @@ void FilterCache::impl_validateAndOptimize()
OSL_ENSURE(!nErrors, ::rtl::OUStringToOString(sLogOut,RTL_TEXTENCODING_UTF8).getStr());
if (nErrors>0)
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration: " + sLogOut,
css::uno::Reference< css::uno::XInterface >(),
sLogOut);
OSL_ENSURE(!nWarnings, ::rtl::OUStringToOString(sLogOut,RTL_TEXTENCODING_UTF8).getStr());
@@ -1566,7 +1559,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
catch(const css::uno::Exception& ex)
{
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration, caught: " + ex.Message,
css::uno::Reference< css::uno::XInterface >(),
ex.Message);
}
@@ -1595,7 +1588,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
catch(const css::uno::Exception& ex)
{
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration, caught: " + ex.Message,
css::uno::Reference< css::uno::XInterface >(),
ex.Message);
}
@@ -1624,7 +1617,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
catch(const css::uno::Exception& ex)
{
throw css::document::CorruptedFilterConfigurationException(
- rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+ "filter configuration, caught: " + ex.Message,
css::uno::Reference< css::uno::XInterface >(),
ex.Message);
}