summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 10:44:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-19 09:39:48 +0100
commit183debd7e078d2daef38170afc8542a4e625602c (patch)
treeaf1f24b61933b2d9da2cc7bf9e8c95405c1f812c /sd
parent9c1383e4da135db28c422752153e9a77558e8c2f (diff)
pretty up logging of exceptions
Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationCloner.cxx7
-rw-r--r--sd/source/filter/html/htmlex.cxx5
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx9
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx39
-rw-r--r--sd/source/ui/view/drviews1.cxx3
5 files changed, 34 insertions, 29 deletions
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx
index 6e0aaac4fba3..b304edff2545 100644
--- a/sd/source/core/CustomAnimationCloner.cxx
+++ b/sd/source/core/CustomAnimationCloner.cxx
@@ -36,6 +36,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <animations/animationnodehelper.hxx>
#include <svx/svditer.hxx>
@@ -123,7 +124,7 @@ namespace sd
catch( Exception& )
{
SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::Clone(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
Reference< XAnimationNode > xEmpty;
return xEmpty;
}
@@ -200,7 +201,7 @@ namespace sd
{
SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformNode(), "
"exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -271,7 +272,7 @@ namespace sd
{
SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformValue(), "
"exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
return rValue;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 011da6c63203..94d55a5e79b5 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -75,6 +75,7 @@
#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <tools/diagnose_ex.h>
#include <drawdoc.hxx>
#include <DrawDocShell.hxx>
@@ -3056,7 +3057,7 @@ bool HtmlExport::checkFileExists( Reference< css::ucb::XSimpleFileAccess3 > cons
catch( css::uno::Exception& )
{
SAL_WARN( "sd", "sd::HtmlExport::checkFileExists(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
return false;
@@ -3107,7 +3108,7 @@ bool HtmlExport::checkForExistingFiles()
catch( Exception& )
{
SAL_WARN( "sd", "sd::HtmlExport::checkForExistingFiles(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
bFound = false;
}
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 483ff88e9389..04b50f9a3936 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -23,6 +23,7 @@
#include <sal/log.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
using namespace sd;
using namespace ::osl;
@@ -147,7 +148,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
catch ( Exception& )
{
SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerPosition(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ));
}
if (xSlideShow.is()) try
@@ -161,7 +162,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
catch ( Exception& )
{
SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerMode(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ));
}
SAL_INFO( "sdremote", "Pointer started, we display the pointer on screen" );
@@ -180,7 +181,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
catch ( Exception& )
{
SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerMode(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ));
}
SAL_INFO( "sdremote", "Pointer dismissed, we hide the pointer on screen" );
@@ -205,7 +206,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
catch ( Exception& )
{
SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerPosition(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ));
}
}
else if ( aCommand[0] == "presentation_resume" )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index b3320f992aef..ee8177df7110 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -43,6 +43,7 @@
#include <basic/sbstar.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/infobar.hxx>
#include <sfx2/request.hxx>
@@ -326,7 +327,7 @@ bool AnimationSlideController::getSlideAPI( sal_Int32 nSlideNumber, Reference< X
{
SAL_WARN( "sd", "sd::AnimationSlideController::getSlideAPI(), "
"exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
return false;
@@ -619,7 +620,7 @@ void SAL_CALL SlideshowImpl::disposing()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::stop(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
mxShow.clear();
@@ -833,7 +834,7 @@ bool SlideshowImpl::startPreview(
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::startPreview(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
bRet = false;
}
@@ -1033,7 +1034,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
catch (const Exception&)
{
SAL_WARN( "sd", "sd::SlideshowImpl::startShow(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
bRet = false;
}
@@ -1103,7 +1104,7 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::startShowImpl(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
return false;
}
}
@@ -1137,7 +1138,7 @@ void SlideshowImpl::paint()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::paint(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1212,7 +1213,7 @@ void SlideshowImpl::removeShapeEvents()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::removeShapeEvents(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1244,7 +1245,7 @@ void SlideshowImpl::registerShapeEvents(sal_Int32 nSlideNumber)
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1316,7 +1317,7 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes > const & xShapes )
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1385,7 +1386,7 @@ void SAL_CALL SlideshowImpl::pause()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::pause(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1415,7 +1416,7 @@ void SAL_CALL SlideshowImpl::resume()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::resume(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
#ifdef ENABLE_SDREMOTE
RemoteServer::presentationStarted( this );
@@ -1719,7 +1720,7 @@ void SlideshowImpl::updateSlideShow()
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::updateSlideShow(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -1844,7 +1845,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
{
bRet = false;
SAL_WARN( "sd", "sd::SlideshowImpl::keyInput(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
return bRet;
@@ -2225,7 +2226,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow()
catch( uno::Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::createSlideShow(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
return xShow;
@@ -2404,7 +2405,7 @@ void SlideshowImpl::resize( const Size& rSize )
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::resize(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -2671,7 +2672,7 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen )
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::setUsePen(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -2720,7 +2721,7 @@ void SlideshowImpl::setEraseAllInk(bool bEraseAllInk)
catch( Exception& )
{
SAL_WARN( "sd.slideshow", "sd::SlideshowImpl::setEraseAllInk(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ));
}
}
@@ -2920,7 +2921,7 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects)
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::gotoPreviousSlide(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -3005,7 +3006,7 @@ void SAL_CALL SlideshowImpl::stopSound( )
catch( Exception& )
{
SAL_WARN( "sd", "sd::SlideshowImpl::stopSound(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index a981863a090f..8843043fb4a9 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -44,6 +44,7 @@
#include <svx/fmglob.hxx>
#include <editeng/outliner.hxx>
#include <svx/dialogs.hrc>
+#include <tools/diagnose_ex.h>
#include <view/viewoverlaymanager.hxx>
@@ -245,7 +246,7 @@ void DrawViewShell::SelectionHasChanged()
catch( css::uno::Exception& )
{
SAL_WARN( "sd", "sd::DrawViewShell::SelectionHasChanged(), exception caught: "
- << comphelper::anyToString( cppu::getCaughtException() ) );
+ << exceptionToString( cppu::getCaughtException() ) );
}
if( HasCurrentFunction() )