From d375986dae5a685ebd8f4d7d011d24a838608e75 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 2 Sep 2014 15:36:28 +0100 Subject: coverity#707084 Uncaught exception Change-Id: I89459f7a77fcb5785cfb2e8288326fce65202d9c --- offapi/com/sun/star/resource/XStringResourceWithLocation.idl | 7 +++++-- scripting/source/stringresource/stringresource.cxx | 4 +++- scripting/source/stringresource/stringresource.hxx | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/offapi/com/sun/star/resource/XStringResourceWithLocation.idl b/offapi/com/sun/star/resource/XStringResourceWithLocation.idl index a905cdbfd3ad..3a5a215ba387 100644 --- a/offapi/com/sun/star/resource/XStringResourceWithLocation.idl +++ b/offapi/com/sun/star/resource/XStringResourceWithLocation.idl @@ -22,7 +22,6 @@ #include - module com { module sun { module star { module resource { /** @@ -65,9 +64,13 @@ interface XStringResourceWithLocation: com::sun::star::resource::XStringResource @throws com::sun::star::lang::IllegalArgumentException if an empty string is passed as URL + + @throws com::sun::star::lang::NoSupportException + if the location is readonly */ void setURL( [in] string URL ) - raises( ::com::sun::star::lang::IllegalArgumentException ); + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::NoSupportException ); }; diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 739525449924..b38ddc638b18 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -2864,7 +2864,9 @@ void StringResourceWithLocationImpl::storeAsURL( const OUString& URL ) } void StringResourceWithLocationImpl::setURL( const OUString& URL ) - throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) + throw (css::lang::IllegalArgumentException, + css::lang::NoSupportException, + css::uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( getMutex() ); implCheckReadOnly( "StringResourceWithLocationImpl::setURL(): Read only" ); diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx index 5a74e6e43eaa..5be7acd0f66c 100644 --- a/scripting/source/stringresource/stringresource.hxx +++ b/scripting/source/stringresource/stringresource.hxx @@ -668,7 +668,8 @@ public: virtual void SAL_CALL storeAsURL( const OUString& URL ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setURL( const OUString& URL ) - throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, + css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; -- cgit