vcl/source/app/salusereventlist.cxx | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
New commits: commit 4e8a4d9ceda1f5931a8a086b175793c81b715b58 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Mar 16 18:39:49 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 17 07:40:31 2021 +0100 use noexcept lambda in DispatchUserEvents to improve debugging Change-Id: I3141888cc08718a2a3883e8a650fdaed7696d1a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112592 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx index 0321fc29e9fd..309e66bafc29 100644 --- a/vcl/source/app/salusereventlist.cxx +++ b/vcl/source/app/salusereventlist.cxx @@ -110,28 +110,14 @@ bool SalUserEventList::DispatchUserEvents( bool bHandleAllCurrentEvents ) * which is do-able, but requires writing some assembly. * See also Scheduler::ProcessTaskScheduling */ -#ifndef IOS - try -#endif - { - ProcessEvent( aEvent ); - } -#ifndef IOS - catch (css::uno::Exception&) - { - TOOLS_WARN_EXCEPTION("vcl", "Uncaught"); - std::abort(); - } - catch (std::exception& e) - { - SAL_WARN("vcl", "Uncaught " << typeid(e).name() << " " << e.what()); - std::abort(); - } - catch (...) - { - SAL_WARN("vcl", "Uncaught exception during DispatchUserEvents!"); - std::abort(); - } +#ifdef IOS + ProcessEvent( aEvent ); +#else + // the noexcept here means that (a) we abort and (b) debuggers will + // likely trigger at the throw site instead of here, making the debugging + // experience better when something goes wrong. + auto process = [&aEvent, this] () noexcept { ProcessEvent(aEvent); }; + process(); #endif aResettableListGuard.reset(); if (!bHandleAllCurrentEvents) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits