diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-14 09:55:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-14 10:18:31 +0000 |
commit | e425df9c7703f23a8aa367f99d9bed354b67c6c4 (patch) | |
tree | ea38e8fd14da01ba4e7cd8b517d5b65f80e0f545 | |
parent | 39f10b2cf4c87591ecc1bfe6833f6118096f8525 (diff) |
catch exceptions from missing components here as well more cleanly
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 8f4beee68..9560774c0 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -1007,13 +1007,21 @@ void TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescript aLock.clear(); // <- SAFE - // Attention! If e.g. an office module was not installed sometimes we find a - // registered detect service, which is referred inside the configuration ... but not realy - // installed. On the other side we use third party components here, which can make trouble anyway. - // So we should handle errors during creation of such services more gracefully .-) - xDetector = css::uno::Reference< css::document::XExtendedFilterDetection >( - xSMGR->createInstance(sDetectService), - css::uno::UNO_QUERY); + try + { + // Attention! If e.g. an office module was not installed sometimes we + // find a registered detect service, which is referred inside the + // configuration ... but not realy installed. On the other side we use + // third party components here, which can make trouble anyway. So we + // should handle errors during creation of such services more + // gracefully .-) + xDetector = css::uno::Reference< css::document::XExtendedFilterDetection >( + xSMGR->createInstance(sDetectService), + css::uno::UNO_QUERY_THROW); + } + catch (...) + { + } if ( ! xDetector.is()) return ::rtl::OUString(); |