summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-22 14:52:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-23 09:01:46 +0200
commit2684aefcf5d2804351bda01a2d2fe7bbbd351451 (patch)
tree5c19a705883a068a4945d7e49376296e341cb191 /filter
parent1fde962b71860d77fb10e9b16c9d5b6c124d9b61 (diff)
new loplugin unnecessarycatchthrow
Change-Id: Iabab71ee076227bc38447ec109afaea1e53a86a6 Reviewed-on: https://gerrit.libreoffice.org/42643 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/filtercache.cxx20
1 files changed, 4 insertions, 16 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index bb4c95b3c95a..423a35c2e955 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -25,7 +25,6 @@
/*TODO see using below ... */
#define AS_ENABLE_FILTER_UINAMES
-#define WORKAROUND_EXCEPTION_PROBLEM
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
@@ -1573,23 +1572,12 @@ CacheItem FilterCache::impl_loadItem(const css::uno::Reference< css::container::
// break this operation. Of course returned API object must be
// checked too.
css::uno::Reference< css::container::XNameAccess > xItem;
- #ifdef WORKAROUND_EXCEPTION_PROBLEM
- try
- {
- #endif
- css::uno::Any aVal = xSet->getByName(sItem);
- if (!(aVal >>= xItem) || !xItem.is())
- {
- OUString sMsg("found corrupted item \"" + sItem + "\".");
- throw css::uno::RuntimeException(sMsg, css::uno::Reference< css::uno::XInterface >());
- }
- #ifdef WORKAROUND_EXCEPTION_PROBLEM
- }
- catch(const css::container::NoSuchElementException&)
+ css::uno::Any aVal = xSet->getByName(sItem);
+ if (!(aVal >>= xItem) || !xItem.is())
{
- throw;
+ throw css::uno::RuntimeException("found corrupted item \"" + sItem + "\".",
+ css::uno::Reference< css::uno::XInterface >());
}
- #endif
// set too. Of course its already used as key into the e.g. outside
// used hash map ... but some of our API methods provide