summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-20 10:25:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-20 10:57:18 +0100
commit4fd65ac3292a219162a19d8cf1d06842a4c4d498 (patch)
treedd6f8461328eeb8450efe82182d36e46aecce416 /forms
parent9f65dff35e0928cc705a255a40d41b82b38c4dc3 (diff)
coverity#706538 Uncaught exception
Change-Id: If23396c545e7add653fa9e5ac6e544aaa794120d
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx18
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