diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 21:18:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 21:25:20 +0100 |
commit | 6b5fb7ef6ab6e3bf555fa707f53e68dd07da9125 (patch) | |
tree | f9ba87cd5d1f0c7f16559622c6798feba6133536 | |
parent | b418b70f0b168ca03242106d669d3c305ea151fc (diff) |
coverity#706301 Uncaught exception
Change-Id: I6c81df21c7c8713e3d409fb9418e6d6bcca48d68
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index b408f39935ce..5d04f13117e1 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1102,8 +1102,19 @@ bool ODbaseTable::CreateImpl() if (!CreateMemoFile(aURL)) { aURL.setExtension(aExt); // kill dbf file - Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + try + { + Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); + aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + } + catch(const ContentCreationException&) + { + const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( + STR_COULD_NOT_DELETE_FILE, + "$name$", aName + ) ); + ::dbtools::throwGenericSQLException( sError, *this ); + } return false; } m_aHeader.db_typ = dBaseIIIMemo; |