From 5be4407d0716f78acdcdf24de135af91f17e51be Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Thu, 7 Aug 2014 11:16:18 +0200 Subject: fdo#82151 fixup The dbaccess unoapi test calls css::sdb::XSingleSelectQueryComposer::appendFilterByColumn in a state where there is no current row, and thus no column value. This does not make sense, but let's not break the build while I figure out how to fix the unoapi test. Change-Id: If813a1544ec9a5dac6f87197982d10576c91cd8c --- dbaccess/source/core/api/CRowSetDataColumn.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 50ff4adcad2b..e367828e100f 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include using namespace dbaccess; @@ -110,12 +111,18 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH { rValue = m_pGetValue(m_nPos).makeAny(); } - catch (css::sdbc::SQLException & e) + catch(const SQLException &e) { - css::uno::Any a(cppu::getCaughtException()); - throw css::lang::WrappedTargetException( - "wrapped css::sdbc::SQLException: " + e.Message, - css::uno::Reference(), a); + // TODO: doing nothing matches the previous behaviour, + // (and keeps dbaccess unoapi test working...) + // but should be investigated... If the value could not be + // fetched, that's a different result than "value is null", + // which corresponds to an empty Any. + //throw WrappedTargetRuntimeException("Could not retrieve column value", *const_cast(this), Any(e)); + // css::uno::Any a(cppu::getCaughtException()); + // throw css::lang::WrappedTargetException( + // "wrapped css::sdbc::SQLException: " + e.Message, + // css::uno::Reference(), a); } } else if ( PROPERTY_ID_LABEL == nHandle && !m_sLabel.isEmpty() ) -- cgit