diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-20 10:25:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-20 10:57:18 +0100 |
commit | 4fd65ac3292a219162a19d8cf1d06842a4c4d498 (patch) | |
tree | dd6f8461328eeb8450efe82182d36e46aecce416 /forms | |
parent | 9f65dff35e0928cc705a255a40d41b82b38c4dc3 (diff) |
coverity#706538 Uncaught exception
Change-Id: If23396c545e7add653fa9e5ac6e544aaa794120d
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 55c182211ece..25debf710347 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/io/XObjectInputStream.hpp> #include <com/sun/star/io/XObjectOutputStream.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/sdb/RowSetVetoException.hpp> #include <com/sun/star/sdb/SQLContext.hpp> @@ -4077,7 +4078,6 @@ void ODatabaseForm::implRemoved(const InterfaceRef& _rxObject) } } - void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( RuntimeException, std::exception ) { // give it to my own error listener @@ -4087,21 +4087,29 @@ void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( R } // com::sun::star::container::XNamed - OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException, std::exception ) { OUString sReturn; - OPropertySetHelper::getFastPropertyValue(PROPERTY_ID_NAME) >>= sReturn; + try + { + OPropertySetHelper::getFastPropertyValue(PROPERTY_ID_NAME) >>= sReturn; + } + catch (const css::beans::UnknownPropertyException&) + { + throw WrappedTargetRuntimeException( + "ODatabaseForm::getName", + *const_cast< ODatabaseForm* >( this ), + ::cppu::getCaughtException() + ); + } return sReturn; } - void SAL_CALL ODatabaseForm::setName(const OUString& aName) throw( RuntimeException, std::exception ) { setFastPropertyValue(PROPERTY_ID_NAME, makeAny(aName)); } - } // namespace frm |