diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-25 21:31:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-26 18:22:20 +0100 |
commit | 5e21a413c788f839a66d9e4c14e745ed18058db8 (patch) | |
tree | d4451246461346a425ad6f796e08bf1514cdd942 /cppuhelper/source/servicemanager.cxx | |
parent | 6fc2bd0094a23aafadeef3f4a8c2803d621a588d (diff) |
cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
Diffstat (limited to 'cppuhelper/source/servicemanager.cxx')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 973201d0f3c2..6a4618cca476 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -479,12 +479,12 @@ private: virtual ~ContentEnumeration() {} virtual sal_Bool SAL_CALL hasMoreElements() - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual css::uno::Any SAL_CALL nextElement() throw ( css::container::NoSuchElementException, - css::lang::WrappedTargetException, css::uno::RuntimeException); + css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception); osl::Mutex mutex_; std::vector< css::uno::Any > factories_; @@ -492,7 +492,7 @@ private: }; sal_Bool ContentEnumeration::hasMoreElements() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { osl::MutexGuard g(mutex_); return iterator_ != factories_.end(); @@ -501,7 +501,7 @@ sal_Bool ContentEnumeration::hasMoreElements() css::uno::Any ContentEnumeration::nextElement() throw ( css::container::NoSuchElementException, - css::lang::WrappedTargetException, css::uno::RuntimeException) + css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { osl::MutexGuard g(mutex_); if (iterator_ == factories_.end()) { @@ -538,13 +538,13 @@ private: virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithContext( css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); + throw (css::uno::Exception, css::uno::RuntimeException, std::exception); virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); + throw (css::uno::Exception, css::uno::RuntimeException, std::exception); rtl::Reference< cppuhelper::ServiceManager > manager_; boost::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > @@ -554,7 +554,7 @@ private: css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWithContext( css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { manager_->loadImplementation(Context, implementation_); return implementation_->createInstance(Context, true); @@ -564,7 +564,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWithArgumentsAndContext( css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { manager_->loadImplementation(Context, implementation_); return implementation_->createInstanceWithArguments( @@ -592,30 +592,30 @@ private: virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithContext( css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); + throw (css::uno::Exception, css::uno::RuntimeException, std::exception); virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); + throw (css::uno::Exception, css::uno::RuntimeException, std::exception); virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstance() throw (css::uno::Exception, css::uno::RuntimeException); + createInstance() throw (css::uno::Exception, css::uno::RuntimeException, std::exception); virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( css::uno::Sequence< css::uno::Any > const & Arguments) - throw (css::uno::Exception, css::uno::RuntimeException); + throw (css::uno::Exception, css::uno::RuntimeException, std::exception); virtual rtl::OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual css::uno::Sequence< rtl::OUString > SAL_CALL - getSupportedServiceNames() throw (css::uno::RuntimeException); + getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception); rtl::Reference< cppuhelper::ServiceManager > manager_; boost::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > @@ -625,7 +625,7 @@ private: css::uno::Reference< css::uno::XInterface > ImplementationWrapper::createInstanceWithContext( css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { manager_->loadImplementation(Context, implementation_); return implementation_->createInstance(Context, false); @@ -635,7 +635,7 @@ css::uno::Reference< css::uno::XInterface > ImplementationWrapper::createInstanceWithArgumentsAndContext( css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { manager_->loadImplementation(Context, implementation_); return implementation_->createInstanceWithArguments( @@ -644,7 +644,7 @@ ImplementationWrapper::createInstanceWithArgumentsAndContext( css::uno::Reference< css::uno::XInterface > ImplementationWrapper::createInstance() - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { return createInstanceWithContext(manager_->getContext()); } @@ -652,27 +652,27 @@ ImplementationWrapper::createInstance() css::uno::Reference< css::uno::XInterface > ImplementationWrapper::createInstanceWithArguments( css::uno::Sequence< css::uno::Any > const & Arguments) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { return createInstanceWithArgumentsAndContext( Arguments, manager_->getContext()); } rtl::OUString ImplementationWrapper::getImplementationName() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return implementation_->info->name; } sal_Bool ImplementationWrapper::supportsService(rtl::OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } css::uno::Sequence< rtl::OUString > ImplementationWrapper::getSupportedServiceNames() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { if (implementation_->info->services.size() > static_cast< sal_uInt32 >(SAL_MAX_INT32)) @@ -964,7 +964,7 @@ void cppuhelper::ServiceManager::disposing() { } rtl::OUString cppuhelper::ServiceManager::getImplementationName() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return rtl::OUString( "com.sun.star.comp.cppuhelper.bootstrap.ServiceManager"); @@ -972,14 +972,14 @@ rtl::OUString cppuhelper::ServiceManager::getImplementationName() sal_Bool cppuhelper::ServiceManager::supportsService( rtl::OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } css::uno::Sequence< rtl::OUString > cppuhelper::ServiceManager::getSupportedServiceNames() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { css::uno::Sequence< rtl::OUString > names(2); names[0] = "com.sun.star.lang.MultiServiceFactory"; @@ -990,7 +990,7 @@ cppuhelper::ServiceManager::getSupportedServiceNames() css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstance( rtl::OUString const & aServiceSpecifier) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { assert(context_.is()); return createInstanceWithContext(aServiceSpecifier, context_); @@ -1000,7 +1000,7 @@ css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstanceWithArguments( rtl::OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { assert(context_.is()); return createInstanceWithArgumentsAndContext( @@ -1009,7 +1009,7 @@ cppuhelper::ServiceManager::createInstanceWithArguments( css::uno::Sequence< rtl::OUString > cppuhelper::ServiceManager::getAvailableServiceNames() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { osl::MutexGuard g(rBHelper.rMutex); if (isDisposed()) { @@ -1036,7 +1036,7 @@ css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstanceWithContext( rtl::OUString const & aServiceSpecifier, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { boost::shared_ptr< Data::Implementation > impl( findServiceImplementation(Context, aServiceSpecifier)); @@ -1050,7 +1050,7 @@ cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext( rtl::OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) + throw (css::uno::Exception, css::uno::RuntimeException, std::exception) { boost::shared_ptr< Data::Implementation > impl( findServiceImplementation(Context, ServiceSpecifier)); @@ -1060,13 +1060,13 @@ cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext( } css::uno::Type cppuhelper::ServiceManager::getElementType() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return css::uno::Type(); } sal_Bool cppuhelper::ServiceManager::hasElements() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { osl::MutexGuard g(rBHelper.rMutex); return @@ -1076,7 +1076,7 @@ sal_Bool cppuhelper::ServiceManager::hasElements() css::uno::Reference< css::container::XEnumeration > cppuhelper::ServiceManager::createEnumeration() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { throw css::uno::RuntimeException( "ServiceManager createEnumeration: method not supported", @@ -1084,7 +1084,7 @@ cppuhelper::ServiceManager::createEnumeration() } sal_Bool cppuhelper::ServiceManager::has(css::uno::Any const &) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { throw css::uno::RuntimeException( "ServiceManager has: method not supported", @@ -1094,7 +1094,7 @@ sal_Bool cppuhelper::ServiceManager::has(css::uno::Any const &) void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement) throw ( css::lang::IllegalArgumentException, - css::container::ElementExistException, css::uno::RuntimeException) + css::container::ElementExistException, css::uno::RuntimeException, std::exception) { css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { @@ -1160,7 +1160,7 @@ void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement) void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) throw ( css::lang::IllegalArgumentException, - css::container::NoSuchElementException, css::uno::RuntimeException) + css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) { css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { @@ -1205,7 +1205,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) css::uno::Reference< css::container::XEnumeration > cppuhelper::ServiceManager::createContentEnumeration( rtl::OUString const & aServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { std::vector< boost::shared_ptr< Data::Implementation > > impls; { @@ -1257,7 +1257,7 @@ cppuhelper::ServiceManager::createContentEnumeration( css::uno::Reference< css::beans::XPropertySetInfo > cppuhelper::ServiceManager::getPropertySetInfo() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return this; } @@ -1267,7 +1267,7 @@ void cppuhelper::ServiceManager::setPropertyValue( throw ( css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (aPropertyName == "DefaultContext") { throw css::beans::PropertyVetoException( @@ -1282,7 +1282,7 @@ css::uno::Any cppuhelper::ServiceManager::getPropertyValue( rtl::OUString const & PropertyName) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (PropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1298,7 +1298,7 @@ void cppuhelper::ServiceManager::addPropertyChangeListener( xListener) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (!aPropertyName.isEmpty() && aPropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1314,7 +1314,7 @@ void cppuhelper::ServiceManager::removePropertyChangeListener( aListener) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (!aPropertyName.isEmpty() && aPropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1330,7 +1330,7 @@ void cppuhelper::ServiceManager::addVetoableChangeListener( aListener) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (!PropertyName.isEmpty() && PropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1346,7 +1346,7 @@ void cppuhelper::ServiceManager::removeVetoableChangeListener( aListener) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { if (!PropertyName.isEmpty() && PropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1357,7 +1357,7 @@ void cppuhelper::ServiceManager::removeVetoableChangeListener( } css::uno::Sequence< css::beans::Property > -cppuhelper::ServiceManager::getProperties() throw (css::uno::RuntimeException) { +cppuhelper::ServiceManager::getProperties() throw (css::uno::RuntimeException, std::exception) { css::uno::Sequence< css::beans::Property > props(1); props[0] = getDefaultContextProperty(); return props; @@ -1365,7 +1365,7 @@ cppuhelper::ServiceManager::getProperties() throw (css::uno::RuntimeException) { css::beans::Property cppuhelper::ServiceManager::getPropertyByName( rtl::OUString const & aName) - throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) + throw (css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) { if (aName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1376,14 +1376,14 @@ css::beans::Property cppuhelper::ServiceManager::getPropertyByName( sal_Bool cppuhelper::ServiceManager::hasPropertyByName( rtl::OUString const & Name) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return Name == "DefaultContext"; } void cppuhelper::ServiceManager::disposing( css::lang::EventObject const & Source) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { removeLegacyFactory( css::uno::Reference< css::lang::XServiceInfo >( |