Kaydet (Commit) 4fd65ac3 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706538 Uncaught exception

Change-Id: If23396c545e7add653fa9e5ac6e544aaa794120d
üst 9f65dff3
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp> #include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XObjectOutputStream.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/CommandType.hpp>
#include <com/sun/star/sdb/RowSetVetoException.hpp> #include <com/sun/star/sdb/RowSetVetoException.hpp>
#include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdb/SQLContext.hpp>
...@@ -4077,7 +4078,6 @@ void ODatabaseForm::implRemoved(const InterfaceRef& _rxObject) ...@@ -4077,7 +4078,6 @@ void ODatabaseForm::implRemoved(const InterfaceRef& _rxObject)
} }
} }
void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( RuntimeException, std::exception ) void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( RuntimeException, std::exception )
{ {
// give it to my own error listener // give it to my own error listener
...@@ -4087,21 +4087,29 @@ void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( R ...@@ -4087,21 +4087,29 @@ void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( R
} }
// com::sun::star::container::XNamed // com::sun::star::container::XNamed
OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException, std::exception ) OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException, std::exception )
{ {
OUString sReturn; 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; return sReturn;
} }
void SAL_CALL ODatabaseForm::setName(const OUString& aName) throw( RuntimeException, std::exception ) void SAL_CALL ODatabaseForm::setName(const OUString& aName) throw( RuntimeException, std::exception )
{ {
setFastPropertyValue(PROPERTY_ID_NAME, makeAny(aName)); setFastPropertyValue(PROPERTY_ID_NAME, makeAny(aName));
} }
} // namespace frm } // namespace frm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment