diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 11:56:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 14:54:55 +0200 |
commit | 0e493cae407cca65f58329b3319d9c836cdf5096 (patch) | |
tree | 97e90d58ea005ec20b0197f2c1663ae6275cbd4e /forms/source | |
parent | b76037f44660808a978ff39864769a5621eab893 (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 'forms/source')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 0cfb1c72fd97..ceb1cfe8befa 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -3041,9 +3041,9 @@ bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, con } catch (const SQLException&) { + DBG_UNHANDLED_EXCEPTION("forms.component"); if ( _bAllowSQLException ) throw; - DBG_UNHANDLED_EXCEPTION("forms.component"); } catch (const Exception&) { diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 11cfed98d15a..05ed6dc5018d 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -459,8 +459,8 @@ void OControlModel::readHelpTextCompatibly(const css::uno::Reference< css::io::X } catch(const Exception&) { - SAL_WARN("forms.component", "OControlModel::readHelpTextCompatibly: could not forward the property value to the aggregate!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OControlModel::readHelpTextCompatibly: could not forward the property value to the aggregate!"); } } @@ -474,8 +474,8 @@ void OControlModel::writeHelpTextCompatibly(const css::uno::Reference< css::io:: } catch(const Exception&) { - SAL_WARN("forms.component", "OControlModel::writeHelpTextCompatibly: could not retrieve the property value from the aggregate!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OControlModel::writeHelpTextCompatibly: could not retrieve the property value from the aggregate!"); } ::comphelper::operator<<( _rxOutStream, sHelpText); } @@ -515,8 +515,8 @@ OControlModel::OControlModel( } catch( const Exception& ) { - SAL_WARN("forms.component", "OControlModel::OControlModel: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OControlModel::OControlModel: caught an exception!"); } } } @@ -1805,8 +1805,8 @@ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::propertyChange: could not adjust my binding-controlled property!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::propertyChange: could not adjust my binding-controlled property!"); } } @@ -2146,8 +2146,8 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue ) catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::doSetControlValue: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::doSetControlValue: caught an exception!"); } } @@ -2167,8 +2167,8 @@ void OBoundControlModel::onConnectedValidator( ) catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::onConnectedValidator: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::onConnectedValidator: caught an exception!"); } recheckValidity( false ); @@ -2187,8 +2187,8 @@ void OBoundControlModel::onDisconnectedValidator( ) catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::onDisconnectedValidator: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::onDisconnectedValidator: caught an exception!"); } recheckValidity( false ); @@ -2265,8 +2265,8 @@ void OBoundControlModel::reset() catch( const SQLException& ) { - SAL_WARN("forms.component", "OBoundControlModel::reset: caught an SQL exception!" ); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::reset: caught an SQL exception!" ); } // #i24495# - don't count the insert row as "invalid" @@ -2310,8 +2310,8 @@ void OBoundControlModel::reset() catch(const Exception&) { - SAL_WARN("forms.component", "OBoundControlModel::reset: this should have succeeded in all cases!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::reset: this should have succeeded in all cases!"); } bool bNeedValueTransfer = true; @@ -2461,8 +2461,8 @@ void OBoundControlModel::disconnectExternalValueBinding( ) catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::disconnectExternalValueBinding: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::disconnectExternalValueBinding: caught an exception!"); } // if the binding also acts as our validator, disconnect the validator, too @@ -2790,8 +2790,8 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification ) catch( const Exception& ) { - SAL_WARN("forms.component", "OBoundControlModel::recheckValidity: caught an exception!"); DBG_UNHANDLED_EXCEPTION("forms.component"); + SAL_WARN("forms.component", "OBoundControlModel::recheckValidity: caught an exception!"); } } |