[Libreoffice-commits] core.git: extensions/source extensions/test
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 4 13:31:55 UTC 2020
extensions/source/abpilot/admininvokationimpl.cxx | 5 +++--
extensions/source/abpilot/datasourcehandling.cxx | 17 +++++++++++------
extensions/source/abpilot/fieldmappingimpl.cxx | 8 +++++---
extensions/source/bibliography/datman.cxx | 6 +++---
extensions/source/bibliography/framectr.cxx | 11 +++++++----
extensions/source/dbpilots/controlwizard.cxx | 5 +++--
extensions/source/dbpilots/groupboxwiz.cxx | 5 +++--
extensions/source/dbpilots/optiongrouplayouter.cxx | 5 +++--
extensions/source/propctrlr/cellbindinghandler.cxx | 4 +++-
extensions/source/propctrlr/formlinkdialog.cxx | 3 ++-
extensions/source/propctrlr/handlerhelper.cxx | 6 ++++--
extensions/source/propctrlr/propcontroller.cxx | 6 +++---
extensions/source/propctrlr/xsdvalidationhelper.cxx | 3 ++-
extensions/test/ole/cpnt/cpnt.cxx | 4 ++--
14 files changed, 54 insertions(+), 34 deletions(-)
New commits:
commit ee7fa0bd67d1c5a6b2f48eff98f96f73302c1d92
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 4 10:12:22 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 4 15:31:16 2020 +0200
use more TOOLS_WARN_EXCEPTION
Change-Id: I7ddc1539cbd020b4b65740e213a0a993672516b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103910
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx
index a151647a1f9e..947f3886232b 100644
--- a/extensions/source/abpilot/admininvokationimpl.cxx
+++ b/extensions/source/abpilot/admininvokationimpl.cxx
@@ -18,6 +18,7 @@
*/
#include "admininvokationimpl.hxx"
+#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/awt/XWindow.hpp>
@@ -27,7 +28,6 @@
#include <componentmodule.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/weld.hxx>
-#include <osl/diagnose.h>
namespace abp
{
@@ -103,7 +103,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL("OAdminDialogInvokation::invokeAdministration: caught an exception while executing the dialog!");
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while executing the dialog!");
}
return false;
}
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 1d7da2e1719b..aa8bba0b33fd 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -153,7 +153,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL( "lcl_implCreateAndSetURL: caught an exception while creating the data source!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while creating the data source!");
}
return aReturn;
@@ -387,7 +388,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL( "ODataSource::registerDataSource: caught an exception while creating the data source!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while creating the data source!");
}
}
@@ -404,7 +406,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL( "ODataSource::registerDataSource: caught an exception while creating the data source!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while creating the data source!");
}
}
@@ -436,7 +439,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL( "ODataSource::remove: caught an exception while creating the data source!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while creating the data source!");
}
}
@@ -551,7 +555,7 @@ namespace abp
catch( const SQLException& e ) { aError <<= e; }
catch( const Exception& )
{
- OSL_FAIL( "ODataSource::connect: caught a generic exception!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot", "");
}
@@ -580,7 +584,8 @@ namespace abp
}
catch( const Exception& )
{
- OSL_FAIL( "ODataSource::connect: caught an exception while trying to display the error!" );
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while trying to display the error!");
}
}
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index df003f36d07f..7a72f8475c4b 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/weld.hxx>
#include <com/sun/star/util/AliasProgrammaticPair.hpp>
#include <strings.hrc>
@@ -31,7 +32,6 @@
#include <unotools/confignode.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
-#include <osl/diagnose.h>
namespace abp
@@ -102,7 +102,8 @@ namespace abp
}
catch(const Exception&)
{
- OSL_FAIL("fieldmapping::invokeDialog: caught an exception while executing the dialog!");
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "caught an exception while executing the dialog!");
}
return false;
}
@@ -196,7 +197,8 @@ namespace abp
}
catch( const Exception& )
{
- OSL_FAIL("fieldmapping::defaultMapping: code is assumed to throw no exceptions!");
+ TOOLS_WARN_EXCEPTION("extensions.abpilot",
+ "code is assumed to throw no exceptions!");
// the config nodes we're using herein should not do this...
}
}
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 7209c978471f..4c4855ca7461 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -92,7 +92,7 @@ static Reference< XConnection > getConnection(const OUString& _rURL)
}
catch (const Exception&)
{
- OSL_FAIL("Exception caught in ODatabaseContext::getRegisteredObject()");
+ TOOLS_WARN_EXCEPTION("extensions.biblio", "");
}
}
// build the connection from the data source
@@ -134,7 +134,7 @@ static Reference< XConnection > getConnection(const Reference< XInterface > &
}
catch (const Exception&)
{
- OSL_FAIL("exception in getConnection");
+ TOOLS_WARN_EXCEPTION("extensions.biblio", "");
}
return xConn;
@@ -636,7 +636,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
}
catch (const Exception&)
{
- OSL_FAIL("Exception in BibDataManager::InsertFields");
+ TOOLS_WARN_EXCEPTION("extensions.biblio", "");
}
}
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 3e4a6470ad56..7f621eb72bea 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -342,7 +342,7 @@ bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XForm
}
catch(const Exception&)
{
- OSL_FAIL("SaveModified: Exception occurred!");
+ TOOLS_WARN_EXCEPTION("extensions.biblio", "");
}
}
return bResult;
@@ -397,7 +397,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught while changing the data source");
+ TOOLS_WARN_EXCEPTION("extensions.biblio",
+ "Exception caught while changing the data source");
}
}
}
@@ -494,7 +495,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
}
catch(const Exception&)
{
- OSL_FAIL("Exception in last() or moveToInsertRow()");
+ TOOLS_WARN_EXCEPTION("extensions.biblio",
+ "Exception in last() or moveToInsertRow()");
}
}
}
@@ -553,7 +555,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
}
catch(const Exception&)
{
- OSL_FAIL("DeleteRecord: exception caught!");
+ TOOLS_WARN_EXCEPTION("extensions.biblio",
+ "DeleteRecord: exception caught!");
}
}
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index f7d189ddee38..24bcf10ec7a6 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -42,7 +42,6 @@
#include <connectivity/conncleanup.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
#include <tools/urlobj.hxx>
-#include <osl/diagnose.h>
#define WIZARD_SIZE_X 60
#define WIZARD_SIZE_Y 23
@@ -555,7 +554,9 @@ namespace dbp
}
catch(const Exception&)
{
- OSL_FAIL("OControlWizard::initContext: unexpected exception while gathering column information!");
+ TOOLS_WARN_EXCEPTION(
+ "extensions.dbpilots",
+ "unexpected exception while gathering column information!");
}
m_aContext.aTypes.emplace(*pBegin,nFieldType);
}
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 6892536ae6b5..9d74990ee0ac 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -20,10 +20,10 @@
#include "groupboxwiz.hxx"
#include "commonpagesdbp.hxx"
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include "optiongrouplayouter.hxx"
#include <helpids.h>
#include <o3tl/safeint.hxx>
-#include <osl/diagnose.h>
#define GBW_STATE_OPTIONLIST 0
#define GBW_STATE_DEFAULTOPTION 1
@@ -159,7 +159,8 @@ namespace dbp
}
catch(const Exception&)
{
- OSL_FAIL("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!");
+ TOOLS_WARN_EXCEPTION("extensions.dbpilots",
+ "caught an exception while creating the radio shapes!");
}
return OControlWizard::onFinish();
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index 04cd5a84746b..546fa9ca7a7d 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include "groupboxwiz.hxx"
#include "dbptools.hxx"
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace dbp
@@ -181,7 +181,8 @@ namespace dbp
}
catch(Exception&)
{
- OSL_FAIL("OOptionGroupLayouter::doLayout: caught an exception while grouping the shapes!");
+ TOOLS_WARN_EXCEPTION("extensions.dbpilots",
+ "caught an exception while grouping the shapes!");
}
}
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index f022f31b99ee..d73d8cfeeb8a 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -163,7 +163,9 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "OPropertyBrowserController::actuatingPropertyChanged( ListCellRange ): caught an exception while resetting the string items!" );
+ TOOLS_WARN_EXCEPTION(
+ "extensions.propctrlr",
+ "ListCellRange: caught an exception while resetting the string items!");
}
}
}
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index 25e9d017f192..7f2d794b4010 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -215,7 +215,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormLinkDialog::commitLinkPairs: caught an exception while setting the properties!" );
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr",
+ "caught an exception while setting the properties!");
}
}
diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx
index f06913275571..1fde39cedf6d 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -199,7 +199,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "PropertyHandlerHelper::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr",
+ "caught an exception while converting via TypeConverter!");
}
}
@@ -229,7 +230,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "PropertyHandlerHelper::convertToControlValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr",
+ "caught an exception while converting via TypeConverter!");
}
}
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 9a421dd4432e..4f3365e6b099 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -925,7 +925,7 @@ namespace pcr
catch(const Exception&)
{
- OSL_FAIL("OPropertyBrowserController::impl_rebindToInspectee_nothrow: caught an exception !");
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr", "");
}
}
@@ -1040,7 +1040,7 @@ namespace pcr
}
catch(const Exception&)
{
- OSL_FAIL("OPropertyBrowserController::doInspection : caught an exception !");
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr", "");
}
}
@@ -1338,7 +1338,7 @@ namespace pcr
}
catch(const Exception&)
{
- OSL_FAIL("OPropertyBrowserController::Commit : caught an exception !");
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr", "");
}
m_sCommittingProperty.clear();
diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx
index bf52801662d2..12197e87d0b3 100644
--- a/extensions/source/propctrlr/xsdvalidationhelper.cxx
+++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx
@@ -70,7 +70,8 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "XSDValidationHelper::XSDValidationHelper: caught an exception while examining the introspectee!" );
+ TOOLS_WARN_EXCEPTION("extensions.propctrlr",
+ "caught an exception while examining the introspectee!");
}
}
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index a45f5c02c26c..3369e03d644b 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <uno/environment.h>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
@@ -353,7 +353,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/,
}
catch(InvalidRegistryException &)
{
- OSL_FAIL( "### InvalidRegistryException!");
+ TOOLS_WARN_EXCEPTION("extensions.olebridge", "");
}
}
return sal_False;
More information about the Libreoffice-commits
mailing list