diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-12-26 09:22:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-26 19:08:42 +0100 |
commit | df773dc769f6a0d676673ac9b5fc0e8132e435e6 (patch) | |
tree | fe744b9d76e5f26282409fbe3b117e24659de7c0 /sfx2 | |
parent | 32b9d07baa0cf6907f14ccb9aa068b51d95eefaa (diff) |
use more TOOLS_WARN_EXCEPTION
so we get more useful log messages when stuff goes wrong
Change-Id: Ia55db7ab1a4d79b0f281673fbbb06c61745fa89e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85829
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailviewacc.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index ccebccacbf81..53423bd567ae 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -27,6 +27,7 @@ #include <vcl/settings.hxx> #include <sal/log.hxx> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -634,7 +635,7 @@ sal_Int32 SAL_CALL SfxThumbnailViewAcc::getAccessibleIndexInParent() } catch (const uno::Exception&) { - OSL_FAIL( "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" ); + TOOLS_WARN_EXCEPTION( "sfx", "OAccessibleContextHelper::getAccessibleIndexInParent" ); } return nRet; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 18dbb9aa5dbb..f4bb29d89755 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -391,7 +391,7 @@ bool FileDialogHelper_Impl::updateExtendedControl( sal_Int16 _nExtendedControlId } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::updateExtendedControl: caught an exception!" ); + TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::updateExtendedControl" ); } } return bIsEnabled; @@ -614,7 +614,7 @@ void FileDialogHelper_Impl::updateVersions() aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), embed::ElementModes::READ ); - DBG_ASSERT( xStorage.is(), "The method must return the storage or throw an exception!" ); + DBG_ASSERT( xStorage.is(), "The method must return the storage or throw exception!" ); if ( !xStorage.is() ) throw uno::RuntimeException(); @@ -1701,7 +1701,7 @@ void FileDialogHelper_Impl::displayFolder( const OUString& _rPath ) } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::displayFolder: caught an exception!" ); + TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::displayFolder" ); } } } @@ -1718,7 +1718,7 @@ void FileDialogHelper_Impl::setFileName( const OUString& _rFile ) } catch( const IllegalArgumentException& ) { - OSL_FAIL( "FileDialogHelper_Impl::setFileName: caught an exception!" ); + TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::setFileName" ); } } } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index deba40fc9f74..ee0808ff9e80 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3095,7 +3095,7 @@ uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage() try { // no notification is required the storage is set the first time pImpl->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage(); - OSL_ENSURE( pImpl->m_xDocStorage.is(), "The method must either return storage or throw an exception!" ); + OSL_ENSURE( pImpl->m_xDocStorage.is(), "The method must either return storage or throw exception!" ); SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false ); pImpl->m_bCreateTempStor = false; |