diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-08-11 16:06:16 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2014-08-11 16:28:42 +0200 |
commit | 33e94f367a0e2d347f313be4dad4ea8d18eff516 (patch) | |
tree | c552590a6a8b0b94faee4f8a536952f1f85d35b0 /dbaccess | |
parent | 213e1f9f85b5edb266607a29f5b02e36904d1070 (diff) |
fdo#82151 finish fixup
Fix the UnoApi test, and give ORowSetDataColumn::getFastPropertyValue the reasonable behaviour.
Change-Id: I68cc1221b6772e3036c78b8234b1d8b248d4d673
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/CRowSetDataColumn.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 16 |
2 files changed, 12 insertions, 18 deletions
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 48e922162039..189ae6844fb1 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -113,17 +113,9 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH } catch(const SQLException &e) { - SAL_INFO("dbaccess", "exception caught: " << e.Message); - // 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<ORowSetDataColumn*>(this), Any(e)); - // css::uno::Any a(cppu::getCaughtException()); - // throw css::lang::WrappedTargetException( - // "wrapped css::sdbc::SQLException: " + e.Message, - // css::uno::Reference<css::uno::XInterface>(), a); + throw WrappedTargetRuntimeException("Could not retrieve column value: " + e.Message, + *const_cast<ORowSetDataColumn*>(this), + Any(e)); } } else if ( PROPERTY_ID_LABEL == nHandle && !m_sLabel.isEmpty() ) diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 09c6b1ad8f2b..4fbbb0bf5034 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -1180,15 +1180,17 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow) SAL_INFO("dbaccess", "ORowSetBase::firePropertyChange() Clone = " << m_bClone); OSL_ENSURE(m_pColumns,"Columns can not be NULL here!"); sal_Int32 i=0; - try + TDataColumns::iterator aEnd = m_aDataColumns.end(); + for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i) { - TDataColumns::iterator aEnd = m_aDataColumns.end(); - for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i) + try + { (*aIter)->fireValueChange(_rOldRow.is() ? (_rOldRow->get())[i+1] : ::connectivity::ORowSetValue()); - } - catch (const Exception&) - { - SAL_WARN("dbaccess", "firePropertyChange: Exception"); + } + catch (const Exception&) + { + SAL_WARN("dbaccess", "firePropertyChange: Exception on column " << i); + } } SAL_INFO("dbaccess", "ORowSetBase::firePropertyChange() Clone = " << m_bClone); } |