summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-27 20:22:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-28 10:31:25 +0000
commitd8a8b5ac59990e043b1f9d8344b6a644d05367fc (patch)
treed0172c701dbb46534083e31ed6de169bc4421802 /connectivity
parent65809118914e84bf7cb355e2fd3bce75d7271778 (diff)
coverity#706303 Uncaught exception
Change-Id: If3963e0ae2c6477eb074e89f411c22a82d339634
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 4c1bf022d8bc..728e01aea794 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2166,7 +2166,14 @@ void SAL_CALL ODbaseTable::alterColumnByName( const OUString& colName, const Ref
Reference<XDataDescriptorFactory> xOldColumn;
m_pColumns->getByName(colName) >>= xOldColumn;
- alterColumn(m_pColumns->findColumn(colName)-1,descriptor,xOldColumn);
+ try
+ {
+ alterColumn(m_pColumns->findColumn(colName)-1,descriptor,xOldColumn);
+ }
+ catch (const css::lang::IndexOutOfBoundsException&)
+ {
+ throw NoSuchElementException(colName, *this);
+ }
}
void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException, std::exception)