summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-14 14:14:24 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-12-19 11:31:13 +0100
commit3262b70bbabef8e899c50e7831ac2ef68dcc7d6c (patch)
treeae7e825019bcfa3b6bdd9f07a0d4169ea41699cd /vcl
parent9980a70af4fc2a5954f7ce2239c592304d3ebac4 (diff)
Report more debug information about caught exception
...in an attempt to track down why various tinderbox builds started to fail CppunitTest_sw_filters_test with an "Uncaught exception during Task::Invoke()!" abort. On IRC, jmux claims that catching exceptions and turning them into abort() here (instead of letting them propagate) is necessary: "The main problem was the wrong state in the scheduler. So something actually handled the exception, but the next caller into the scheduler had an invalid linked list of tasks, breaking things left and right." Change-Id: Ic3365e282404483518652c00160c2036b79991cf Reviewed-on: https://gerrit.libreoffice.org/46450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit ba81ac19b7aec4fd7f07fcec9f6ea6f85d9aaa24) Reviewed-on: https://gerrit.libreoffice.org/46532 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/salusereventlist.cxx22
-rw-r--r--vcl/source/app/scheduler.cxx25
2 files changed, 41 insertions, 6 deletions
diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx
index a3b77ecc2c19..50ef1f892002 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -21,7 +21,14 @@
#include <salwtype.hxx>
#include <algorithm>
-
+#include <cstdlib>
+#include <exception>
+#include <typeinfo>
+
+#include <com/sun/star/uno/Exception.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
#include <svdata.hxx>
SalUserEventList::SalUserEventList()
@@ -90,9 +97,20 @@ bool SalUserEventList::DispatchUserEvents( bool bHandleAllCurrentEvents )
{
ProcessEvent( aEvent );
}
+ catch (css::uno::Exception& e)
+ {
+ auto const e2 = cppu::getCaughtException();
+ SAL_WARN("vcl", "Uncaught " << e2.getValueTypeName() << " " << e.Message);
+ std::abort();
+ }
+ catch (std::exception& e)
+ {
+ SAL_WARN("vcl", "Uncaught " << typeid(e).name() << " " << e.what());
+ std::abort();
+ }
catch (...)
{
- SAL_WARN( "vcl", "Uncaught exception during ProcessEvent!" );
+ SAL_WARN("vcl", "Uncaught exception during DispatchUserEvents!");
std::abort();
}
}
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 2ef3c87d83f8..b53a58ecf555 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -20,7 +20,14 @@
#include <sal/config.h>
#include <cassert>
-
+#include <cstdlib>
+#include <exception>
+#include <typeinfo>
+
+#include <com/sun/star/uno/Exception.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
#include <svdata.hxx>
#include <tools/time.hxx>
#include <unotools/configmgr.hxx>
@@ -439,11 +446,21 @@ next_entry:
{
pTask->Invoke();
}
+ catch (css::uno::Exception& e)
+ {
+ auto const e2 = cppu::getCaughtException();
+ SAL_WARN("vcl.schedule", "Uncaught " << e2.getValueTypeName() << " " << e.Message);
+ std::abort();
+ }
+ catch (std::exception& e)
+ {
+ SAL_WARN("vcl.schedule", "Uncaught " << typeid(e).name() << " " << e.what());
+ std::abort();
+ }
catch (...)
{
- SAL_WARN( "vcl.schedule",
- "Uncaught exception during Task::Invoke()!" );
- abort();
+ SAL_WARN("vcl.schedule", "Uncaught exception during Task::Invoke()!");
+ std::abort();
}
Lock( nLockCount );
pMostUrgent->mbInScheduler = false;