diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-08-02 14:25:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-02 15:23:39 +0000 |
commit | 5ccf6776a130cc7bdd692bbcfd1be47001609ee4 (patch) | |
tree | a8753dd8942f5414a95c1b0ff74a6d068ed06e4d /salhelper | |
parent | 498bcdbbb02696c66f9bd093b30c17b9efd1459c (diff) |
don't catch SEH exceptions in sal thread code
...just for libreoffice-5-2, which does not have
62c047ffb397802c09df9070492e70725928cadf "switch to EHs on windows" and
needs this for crash reporting in spawned salhelper::Threads.
Change-Id: I1e8f15d8f2fb5a741538d16de34c47f66dfaba0d
Reviewed-on: https://gerrit.libreoffice.org/26968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'salhelper')
-rw-r--r-- | salhelper/source/thread.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/salhelper/source/thread.cxx b/salhelper/source/thread.cxx index 52c028c133ba..ea188b81d48f 100644 --- a/salhelper/source/thread.cxx +++ b/salhelper/source/thread.cxx @@ -38,12 +38,20 @@ void salhelper::Thread::run() { try { setName(name_); execute(); - } catch (...) { + } catch (const std::exception&) { // Work around the problem that onTerminated is not called if run throws // an exception: onTerminated(); throw; } + // don't use a catch all handler with EHa as that will catch SEH exceptions +#ifndef WNT + catch (...) + { + onTerminated(); + throw; + } +#endif } void salhelper::Thread::onTerminated() { release(); } |