summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-28 18:32:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-29 09:58:43 +0100
commit6bc5d6cac2fd9e029357c618510a3b5f3aa7c085 (patch)
tree9ef016fe86e3e4554ccca9893f8d7c4228c5f395 /comphelper
parent53f90ba47376aac928c6666d34ef62473052bf6d (diff)
remove counter-productive catch-all blocks
There is no point in these - the rethrow will crash the process anyway, so trying to recover anything is a waste of time. And they very unhelpfully obscure the stacktrace of the actual underlying problem. Change-Id: I8e4439e5e2c517aa80a1750a05c207d274c73012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125980 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/asyncnotification.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index e498ce23ba44..e2c5691899d3 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -231,26 +231,16 @@ namespace comphelper
{
// see salhelper::Thread::launch
xThis->m_xImpl->pKeepThisAlive = xThis;
- try {
- if (!xThis->create()) {
- throw std::runtime_error("osl::Thread::create failed");
- }
- } catch (...) {
- xThis->m_xImpl->pKeepThisAlive.reset();
- throw;
+ if (!xThis->create()) {
+ throw std::runtime_error("osl::Thread::create failed");
}
}
void AsyncEventNotifierAutoJoin::run()
{
// see salhelper::Thread::run
- try {
- setName(m_xImpl->name);
- execute();
- } catch (...) {
- onTerminated();
- throw;
- }
+ setName(m_xImpl->name);
+ execute();
}
void AsyncEventNotifierAutoJoin::onTerminated()