summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 11:56:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 14:54:55 +0200
commit0e493cae407cca65f58329b3319d9c836cdf5096 (patch)
tree97e90d58ea005ec20b0197f2c1663ae6275cbd4e /dbaccess
parentb76037f44660808a978ff39864769a5621eab893 (diff)
new loplugin:dbgunhandledexception
enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block, otherwise it cannot do it's job properly Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1 Reviewed-on: https://gerrit.libreoffice.org/52303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx2
5 files changed, 5 insertions, 8 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 46f59d6d2c08..9f76150d75ca 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -605,8 +605,8 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r
}
catch( const Exception& )
{
- SAL_WARN("dbaccess", "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
DBG_UNHANDLED_EXCEPTION("dbaccess");
+ SAL_WARN("dbaccess", "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
// every part of the additive statement should have passed other tests already, and should not
// be able to cause any errors ... me thinks
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 2acfbe8bc341..5556e0f02cc6 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1436,10 +1436,10 @@ IMPL_LINK_NOARG(SbaGridControl, AsynchDropEvent, void*, void)
}
catch(const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION("dbaccess");
if (m_pMasterListener)
m_pMasterListener->AfterDrop();
Show();
- DBG_UNHANDLED_EXCEPTION("dbaccess");
}
if ( !bCountFinal )
setDataSource(Reference< XRowSet >(xDataSource,UNO_QUERY));
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 32e2488b672f..aff8900255e6 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2386,13 +2386,10 @@ bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, co
}
catch( const WrappedTargetException& e )
{
- SQLException aSql;
if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) )
showError( SQLExceptionInfo( e.TargetException ) );
else
- {
- DBG_UNHANDLED_EXCEPTION("dbaccess");
- }
+ SAL_WARN("dbaccess", e);
}
catch(const Exception&)
{
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index a7fa6a8d9fa6..0e02efe02a2a 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1519,9 +1519,9 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
}
catch(const Exception&)
{
+ DBG_UNHANDLED_EXCEPTION("dbaccess");
if ( !bNew )
m_sName = sOriginalName;
- DBG_UNHANDLED_EXCEPTION("dbaccess");
}
showError( aInfo );
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 6662a2a535da..de6d7fef6aa1 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -411,8 +411,8 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
}
catch( const Exception& )
{
- bError = true;
DBG_UNHANDLED_EXCEPTION("dbaccess");
+ bError = true;
}
if ( aInfo.isValid() )