diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-30 14:19:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-01 09:28:52 +0100 |
commit | d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 (patch) | |
tree | 995c41a30f4224233267a8cfb05da41ae8c10275 /sfx2 | |
parent | 102fdc08b86599b9e538d2f38df865d56b3ec63d (diff) |
OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/view/frame.cxx | 3 |
8 files changed, 26 insertions, 33 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index a01f5d6a6bdc..9f83906fbd65 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -286,7 +286,7 @@ IMPL_LINK(ContentTabPage_Impl, ExpandingHdl, const weld::TreeIter&, rIter, bool) } catch (const Exception&) { - OSL_FAIL( "ContentListBox_Impl::RequestingChildren(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "ContentListBox_Impl::RequestingChildren(): unexpected exception" ); } } @@ -678,7 +678,7 @@ void IndexTabPage_Impl::InitializeIndex() } catch( Exception& ) { - OSL_FAIL( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "IndexTabPage_Impl::InitializeIndex(): unexpected exception" ); } m_xIndexList->thaw(); @@ -1793,7 +1793,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const } catch( Exception& ) { - OSL_FAIL( "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" ); } return xCursor; @@ -1853,7 +1853,7 @@ IMPL_LINK_NOARG(SfxHelpTextWindow_Impl, SelectHdl, Timer *, void) } catch( Exception& ) { - OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); } } @@ -1942,7 +1942,7 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg) } catch( Exception& ) { - OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); } } @@ -2408,7 +2408,7 @@ void SfxHelpWindow_Impl::openDone(const OUString& sURL , } catch( Exception& ) { - OSL_FAIL( "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" ); } // When the SearchPage opens the help doc, then select all words, which are equal to its text @@ -2615,7 +2615,7 @@ void SfxHelpWindow_Impl::DoAction(std::string_view rActionId) } catch( Exception& ) { - OSL_FAIL( "SfxHelpWindow_Impl::DoAction(): unexpected exception" ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::DoAction(): unexpected exception" ); } } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9c442d01e837..1b39b59bf0c8 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1176,7 +1176,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con } catch( const Exception& ) { - OSL_FAIL( "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" ); } } @@ -1441,7 +1441,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList, } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } @@ -1462,7 +1462,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList, } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } } @@ -2201,7 +2201,7 @@ void FileDialogHelper_Impl::setDefaultValues() } catch( const Exception& ) { - OSL_FAIL( "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" ); } } } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 182c20296d9e..4247bc272717 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -44,6 +44,7 @@ #include <sal/log.hxx> #include <osl/diagnose.h> +#include <tools/diagnose_ex.h> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> @@ -1679,7 +1680,7 @@ static OUString getModuleIdentifier( const Reference< XModuleManager2 >& i_xModM } catch ( Exception& ) { - OSL_FAIL( "getModuleIdentifier(): exception of XModuleManager::identify()" ); + TOOLS_WARN_EXCEPTION( "sfx", "getModuleIdentifier(): exception of XModuleManager::identify()" ); } return sIdentifier; diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index b12d251924f1..9f7b97bc36c7 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <comphelper/random.hxx> +#include <tools/diagnose_ex.h> #include <algorithm> #include <memory> @@ -1267,7 +1268,7 @@ void Metadatable::RemoveMetadataReference() } catch (const uno::Exception &) { - OSL_FAIL("Metadatable::RemoveMetadataReference: exception"); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::RemoveMetadataReference"); } } @@ -1424,7 +1425,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, } catch (const uno::Exception &) { - OSL_FAIL("Metadatable::RegisterAsCopyOf: exception"); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::RegisterAsCopyOf"); } } @@ -1448,7 +1449,7 @@ std::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const } catch (const uno::Exception &) { - OSL_FAIL("Metadatable::CreateUndo: exception"); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::CreateUndo"); } return std::shared_ptr<MetadatableUndo>(); } @@ -1518,7 +1519,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther, } catch (const uno::Exception &) { - OSL_FAIL("Metadatable::JoinMetadatable: exception"); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::JoinMetadatable"); } } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 19649cc26ff9..1cff1409d723 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -40,6 +40,7 @@ #include <svl/stritem.hxx> #include <memory> #include <osl/diagnose.h> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::lang; @@ -240,7 +241,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } @@ -261,7 +262,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 736b7d229d4b..42ad906e07d7 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -241,7 +241,7 @@ public: } catch( const uno::Exception& ) { - OSL_FAIL( "Unexpected exception!" ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "" ); } } } diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index e2ce74172288..09d1c506522c 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -38,6 +38,7 @@ #include <osl/file.hxx> #include <osl/thread.hxx> #include <tools/urlobj.hxx> +#include <tools/diagnose_ex.h> #include <ucbhelper/content.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <osl/mutex.hxx> @@ -539,21 +540,9 @@ class ImplUCBPrintWatcher : public ::osl::Thread css::ucb::NameClash::OVERWRITE); } } - catch (const css::ucb::ContentCreationException&) - { - OSL_FAIL("content create exception"); - } - catch (const css::ucb::CommandAbortedException&) - { - OSL_FAIL("command abort exception"); - } - catch (const css::uno::RuntimeException&) - { - OSL_FAIL("runtime exception"); - } catch (const css::uno::Exception&) { - OSL_FAIL("unknown exception"); + TOOLS_WARN_EXCEPTION( "sfx.doc", ""); } // kill the temp file! diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index efd6a4e67a96..cdfa36ff82ed 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -32,6 +32,7 @@ #include <svl/stritem.hxx> #include <tools/svborder.hxx> #include <osl/diagnose.h> +#include <tools/diagnose_ex.h> #include <appdata.hxx> #include <sfx2/app.hxx> @@ -639,7 +640,7 @@ void SfxFrame::CreateWorkWindow_Impl() } catch(Exception&) { - OSL_FAIL("SfxFrame::CreateWorkWindow_Impl: Exception caught. Please try to submit a reproducible bug!"); + TOOLS_WARN_EXCEPTION( "sfx.view", "SfxFrame::CreateWorkWindow_Impl: Exception caught. Please try to submit a reproducible bug!"); } } |