summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/dbgunhandledexception.cxx107
-rw-r--r--compilerplugins/clang/test/dbgunhandledexception.cxx37
-rw-r--r--connectivity/source/drivers/hsqldb/HView.cxx2
-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
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx18
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx22
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx4
-rw-r--r--sd/source/ui/sidebar/DocumentHelper.cxx2
-rw-r--r--solenv/CompilerTest_compilerplugins_clang.mk1
-rw-r--r--svx/source/fmcomp/gridcell.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/fmobjfac.cxx2
-rw-r--r--vcl/source/control/field2.cxx1
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/forms/elementexport.cxx6
20 files changed, 182 insertions, 41 deletions
diff --git a/compilerplugins/clang/dbgunhandledexception.cxx b/compilerplugins/clang/dbgunhandledexception.cxx
new file mode 100644
index 000000000000..54b00f57f758
--- /dev/null
+++ b/compilerplugins/clang/dbgunhandledexception.cxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * Based on LLVM/Clang.
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ */
+
+#include "check.hxx"
+#include "plugin.hxx"
+#include <clang/Lex/Lexer.h>
+#include <fstream>
+#include <set>
+
+namespace loplugin
+{
+/*
+This is a compile check.
+
+Check that DBG_UNHANDLED_EXCEPTION is always the first statement in a catch block, otherwise
+it does not work properly.
+*/
+
+class DbgUnhandledException : public RecursiveASTVisitor<DbgUnhandledException>, public Plugin
+{
+public:
+ explicit DbgUnhandledException(InstantiationData const& data);
+ virtual void run() override;
+ bool VisitCallExpr(CallExpr const* call);
+ bool TraverseCXXCatchStmt(CXXCatchStmt*);
+
+private:
+ CXXCatchStmt const* currCatchStmt = nullptr;
+};
+
+DbgUnhandledException::DbgUnhandledException(const InstantiationData& data)
+ : Plugin(data)
+{
+}
+
+void DbgUnhandledException::run()
+{
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+}
+
+bool DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
+{
+ auto prevCatchStmt = currCatchStmt;
+ currCatchStmt = catchStmt;
+ auto rv = RecursiveASTVisitor::TraverseCXXCatchStmt(catchStmt);
+ currCatchStmt = prevCatchStmt;
+ return rv;
+}
+
+bool DbgUnhandledException::VisitCallExpr(const CallExpr* call)
+{
+ if (ignoreLocation(call))
+ return true;
+ const FunctionDecl* func = call->getDirectCallee();
+ if (!func)
+ return true;
+
+ if (!func->getIdentifier() || func->getName() != "DbgUnhandledException")
+ return true;
+
+ if (!currCatchStmt)
+ {
+ report(DiagnosticsEngine::Warning, "DBG_UNHANDLED_EXCEPTION outside catch block",
+ call->getLocStart());
+ return true;
+ }
+ auto catchBlock = dyn_cast<CompoundStmt>(currCatchStmt->getHandlerBlock());
+ if (!catchBlock)
+ {
+ report(DiagnosticsEngine::Warning,
+ "something wrong with DBG_UNHANDLED_EXCEPTION, no CompoundStmt?",
+ call->getLocStart());
+ return true;
+ }
+ if (catchBlock->size() < 1)
+ {
+ report(DiagnosticsEngine::Warning,
+ "something wrong with DBG_UNHANDLED_EXCEPTION, CompoundStmt size == 0?",
+ call->getLocStart());
+ return true;
+ }
+
+ Stmt const* firstStmt = *catchBlock->body_begin();
+ if (auto exprWithCleanups = dyn_cast<ExprWithCleanups>(firstStmt))
+ firstStmt = exprWithCleanups->getSubExpr();
+ if (firstStmt != call)
+ {
+ report(DiagnosticsEngine::Warning,
+ "DBG_UNHANDLED_EXCEPTION must be first statement in catch block",
+ call->getLocStart());
+ }
+ return true;
+}
+
+static Plugin::Registration<DbgUnhandledException> X("dbgunhandledexception");
+
+} // namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/test/dbgunhandledexception.cxx b/compilerplugins/clang/test/dbgunhandledexception.cxx
new file mode 100644
index 000000000000..0abaef0dd06d
--- /dev/null
+++ b/compilerplugins/clang/test/dbgunhandledexception.cxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <tools/diagnose_ex.h>
+
+void func1();
+
+int main()
+{
+ try
+ {
+ func1();
+ }
+ catch (std::exception const&)
+ {
+ SAL_WARN("xmloff", "message");
+ DBG_UNHANDLED_EXCEPTION(
+ "xmloff",
+ "message"); // expected-error@-2 {{DBG_UNHANDLED_EXCEPTION must be first statement in catch block [loplugin:dbgunhandledexception]}}
+ }
+ try
+ {
+ func1();
+ }
+ catch (std::exception const&)
+ {
+ DBG_UNHANDLED_EXCEPTION("xmloff", "message");
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx
index 10ec3ed7a2e4..bd4e65eca2c4 100644
--- a/connectivity/source/drivers/hsqldb/HView.cxx
+++ b/connectivity/source/drivers/hsqldb/HView.cxx
@@ -130,9 +130,9 @@ namespace connectivity { namespace hsqldb
}
catch( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION("connectivity.hsqldb");
if ( bDropSucceeded )
xStatement->execute( sRestoreCommand );
- DBG_UNHANDLED_EXCEPTION("connectivity.hsqldb");
}
}
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() )
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 37db834b8d62..5f94899b054e 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -1937,8 +1937,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: caught an exception!" );
}
}
@@ -2014,8 +2014,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::onNewComponent: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::onNewComponent: caught an exception!" );
}
}
@@ -2268,8 +2268,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_getRowSet_nothrow: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_getRowSet_nothrow: caught an exception!" );
}
return xReturn;
}
@@ -2303,8 +2303,8 @@ namespace pcr
}
catch (const Exception&)
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_initFieldList_nothrow: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_initFieldList_nothrow: caught an exception!" );
}
}
@@ -2354,8 +2354,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" );
}
// additional info about what happened
INetURLObject aParser( sDataSourceName );
@@ -2413,8 +2413,8 @@ namespace pcr
}
catch (const Exception&)
{
- OSL_FAIL("FormComponentPropertyHandler::impl_describeCursorSource_nothrow: caught an exception !");
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL("FormComponentPropertyHandler::impl_describeCursorSource_nothrow: caught an exception !");
}
}
@@ -2586,8 +2586,8 @@ namespace pcr
catch (const SQLException& e) { aErrorInfo = e; }
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow: caught an exception!" );
}
if ( aErrorInfo.isValid() )
@@ -2681,8 +2681,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFormatting_nothrow: : caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFormatting_nothrow: : caught an exception!" );
}
return bChanged;
}
@@ -3196,8 +3196,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
+ OSL_FAIL( "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" );
}
}
return bHas;
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!");
}
}
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 2f671b5872e6..e8f17e035c2e 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -108,8 +108,8 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, vcl::Window* pPare
}
catch (Exception&)
{
- OSL_FAIL("PropBrw::PropBrw: could not create/initialize my frame!");
DBG_UNHANDLED_EXCEPTION("reportdesign");
+ OSL_FAIL("PropBrw::PropBrw: could not create/initialize my frame!");
m_xMeAsFrame.clear();
}
@@ -153,8 +153,8 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, vcl::Window* pPare
}
catch (Exception&)
{
- OSL_FAIL("PropBrw::PropBrw: could not create/initialize the browser controller!");
DBG_UNHANDLED_EXCEPTION("reportdesign");
+ OSL_FAIL("PropBrw::PropBrw: could not create/initialize the browser controller!");
try
{
::comphelper::disposeComponent(m_xBrowserController);
diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx
index b7b3519bfaa4..dc76d90a4777 100644
--- a/sd/source/ui/sidebar/DocumentHelper.cxx
+++ b/sd/source/ui/sidebar/DocumentHelper.cxx
@@ -229,8 +229,8 @@ SdPage* DocumentHelper::AddMasterPage (
}
catch(const uno::Exception&)
{
- pClonedMasterPage = nullptr;
DBG_UNHANDLED_EXCEPTION("sd");
+ pClonedMasterPage = nullptr;
}
catch(const ::std::exception& e)
{
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index 5187f60beb2f..17866e52781f 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/cppunitassertequals \
compilerplugins/clang/test/cstylecast \
compilerplugins/clang/test/datamembershadow \
+ compilerplugins/clang/test/dbgunhandledexception \
compilerplugins/clang/test/dodgyswitch \
compilerplugins/clang/test/doubleconvert \
compilerplugins/clang/test/emptyif \
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index d5edb7c1ff5f..feb3c3fb9b23 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1094,8 +1094,8 @@ void DbTextField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCurso
}
catch( const Exception& )
{
- OSL_FAIL( "DbTextField::Init: caught an exception while determining the multi-line capabilities!" );
DBG_UNHANDLED_EXCEPTION("svx");
+ OSL_FAIL( "DbTextField::Init: caught an exception while determining the multi-line capabilities!" );
}
m_bIsSimpleEdit = !bIsMultiLine;
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index ba4cff36d95e..8093bddd31b9 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2440,8 +2440,8 @@ bool DbGridControl::SeekCursor(long nRow, bool bAbsolute)
}
catch(Exception&)
{
- OSL_FAIL("DbGridControl::SeekCursor : failed ...");
DBG_UNHANDLED_EXCEPTION("svx");
+ OSL_FAIL("DbGridControl::SeekCursor : failed ...");
m_nSeekPos = -1; // no further data set available
}
}
diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx
index d0169efd51c8..bfc834e9cd1a 100644
--- a/svx/source/form/fmobjfac.cxx
+++ b/svx/source/form/fmobjfac.cxx
@@ -100,8 +100,8 @@ namespace
}
catch( const Exception& )
{
- OSL_FAIL( "lcl_initProperty: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("svx");
+ OSL_FAIL( "lcl_initProperty: caught an exception!" );
}
}
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index e05960b660f0..c57449aec148 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -161,7 +161,6 @@ static bool ImplIsPatternChar( sal_Unicode cChar, sal_Char cEditMask )
}
catch (const css::uno::Exception&)
{
- SAL_WARN( "vcl.control", "ImplIsPatternChar: Exception caught!" );
DBG_UNHANDLED_EXCEPTION("vcl.control");
return false;
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index a2baf499cabd..6adabad9bb6e 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1593,7 +1593,7 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName)
}
}
else {
- DBG_UNHANDLED_EXCEPTION( "xmloff.core", "not possible to create NameContainer");
+ SAL_WARN( "xmloff.core", "not possible to create NameContainer");
}
}
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index b846ac745732..3ba0762e9623 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1796,8 +1796,8 @@ namespace xmloff
}
catch( const Exception& )
{
- OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("xmloff.forms");
+ OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" );
}
}
@@ -1838,8 +1838,8 @@ namespace xmloff
}
catch( const Exception& )
{
- OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("xmloff.forms");
+ OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" );
}
}
@@ -1911,8 +1911,8 @@ namespace xmloff
}
catch( const Exception& )
{
- OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" );
DBG_UNHANDLED_EXCEPTION("xmloff.forms");
+ OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" );
}
return false;