Kaydet (Commit) 9b571828 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#707418 Uncaught exception

and

coverity#707419 Uncaught exception
coverity#707420 Uncaught exception

Change-Id: I98d752c14be5f7b1fccb4bdf2eeefb6bbfe12e0e
üst 337abdbc
......@@ -25,9 +25,11 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/script/Converter.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <boost/scoped_ptr.hpp>
using namespace com::sun::star::beans;
......@@ -1275,7 +1277,7 @@ void SAL_CALL CachedContentResultSet
// XContentAccess methods. ( inherited ) ( -- position dependent )
#define XCONTENTACCESS_queryXXX( queryXXX, XXX, TYPE ) \
#define XCONTENTACCESS_queryXXX( queryXXX, XXX, TYPE ) \
impl_EnsureNotDisposed(); \
ReacquireableGuard aGuard( m_aMutex ); \
sal_Int32 nRow = m_nRow; \
......@@ -1283,33 +1285,46 @@ sal_Int32 nFetchSize = m_nFetchSize; \
sal_Int32 nFetchDirection = m_nFetchDirection; \
if( !m_aCache##XXX.hasRow( nRow ) ) \
{ \
if( !m_aCache##XXX.hasCausedException( nRow ) ) \
{ \
if( !m_xFetchProviderForContentAccess.is() ) \
try \
{ \
if( !m_aCache##XXX.hasCausedException( nRow ) ) \
{ \
OSL_FAIL( "broadcaster was disposed already" );\
throw RuntimeException(); \
if( !m_xFetchProviderForContentAccess.is() ) \
{ \
OSL_FAIL( "broadcaster was disposed already" ); \
throw RuntimeException(); \
} \
aGuard.clear(); \
if( impl_isForwardOnly() ) \
applyPositionToOrigin( nRow ); \
\
FETCH_XXX( m_aCache##XXX, m_xFetchProviderForContentAccess, fetch##XXX##s ); \
} \
aGuard.clear(); \
if( impl_isForwardOnly() ) \
aGuard.reacquire(); \
if( !m_aCache##XXX.hasRow( nRow ) ) \
{ \
aGuard.clear(); \
applyPositionToOrigin( nRow ); \
\
FETCH_XXX( m_aCache##XXX, m_xFetchProviderForContentAccess, fetch##XXX##s ); \
TYPE aRet = ContentResultSetWrapper::queryXXX();\
if( m_xContentIdentifierMapping.is() ) \
return m_xContentIdentifierMapping->map##XXX( aRet );\
return aRet; \
} \
} \
catch (const RuntimeException&) \
{ \
throw; \
} \
aGuard.reacquire(); \
if( !m_aCache##XXX.hasRow( nRow ) ) \
catch (const Exception& e) \
{ \
aGuard.clear(); \
applyPositionToOrigin( nRow ); \
TYPE aRet = ContentResultSetWrapper::queryXXX(); \
if( m_xContentIdentifierMapping.is() ) \
return m_xContentIdentifierMapping->map##XXX( aRet );\
return aRet; \
Any a(cppu::getCaughtException()); \
throw WrappedTargetRuntimeException( \
"wrapped Exception " + e.Message, \
Reference<XInterface>(), a); \
} \
} \
return m_aCache##XXX.get##XXX( nRow );
// virtual
OUString SAL_CALL CachedContentResultSet
::queryContentIdentifierString()
......
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