summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-10 15:53:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-10 18:14:35 +0100
commitf5c8a636a644d4b74450de29f11399f3f69f55a7 (patch)
tree3c8bb37fbd19f0c1eb25cee710b85669b23a5b5a /connectivity/source/drivers/dbase
parent9b92b4239e8d8d9657a0ba22959c7b0a99306870 (diff)
coverity#706302 Uncaught exception
Change-Id: I082b7682124053948733efc2dbe5df6196acaa5f
Diffstat (limited to 'connectivity/source/drivers/dbase')
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 895f0de82e88..a98a54d0397b 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2256,8 +2256,19 @@ void ODbaseTable::alterColumn(sal_Int32 index,
// now drop the old one
if( DropImpl() ) // we don't want to delete the memo columns too
{
- // rename the new one to the old one
- pNewTable->renameImpl(m_Name);
+ try
+ {
+ // rename the new one to the old one
+ pNewTable->renameImpl(m_Name);
+ }
+ catch(const css::container::ElementExistException&)
+ {
+ const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution(
+ STR_COULD_NOT_DELETE_FILE,
+ "$filename$", m_Name
+ ) );
+ ::dbtools::throwGenericSQLException( sError, *this );
+ }
// release the temp file
pNewTable = NULL;
::comphelper::disposeComponent(xHoldTable);