vcl/workben/minvcl.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3bb2cec6f9b81724f5a5e98065122da1f502e6ff
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 3 15:30:05 2022 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Jan 3 20:17:37 2022 +0100

    cid#1496842 silence Uncaught exception
    
    and
    
    cid#1496843 Uncaught exception
    
    Change-Id: I39b972b5573a5d0093e13206508ddd0088cb1146
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127899
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/workben/minvcl.cxx b/vcl/workben/minvcl.cxx
index 98e8dddaacc3..9592769879fa 100644
--- a/vcl/workben/minvcl.cxx
+++ b/vcl/workben/minvcl.cxx
@@ -13,6 +13,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <i18nlangtag/languagetag.hxx>
 #include <i18nlangtag/mslangid.hxx>
+#include <o3tl/deleter.hxx>
 
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
@@ -55,7 +56,7 @@ int TheApplication::Main()
     return 0;
 }
 
-int main()
+static int main_impl()
 {
     auto xContext = cppu::defaultBootstrap_InitialComponentContext();
     css::uno::Reference<css::lang::XMultiServiceFactory> xServiceManager(
@@ -74,4 +75,11 @@ int main()
     return ret;
 }
 
+int main()
+{
+    int ret;
+    suppress_fun_call_w_exception(ret = main_impl());
+    return ret;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */

Reply via email to