sfx2/source/doc/objstor.cxx |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 2fd5440c9766fa2833a3fc4dcb8a0d57a089121b
Author:     Henry Castro <[email protected]>
AuthorDate: Thu Nov 3 10:52:16 2022 -0400
Commit:     Henry Castro <[email protected]>
CommitDate: Tue Dec 6 18:08:32 2022 +0000

    sfx2: add log information to catch the exception
    
    Add log information for data analysis if the ExportTo
    fails due to an exception.
    
    Signed-off-by: Henry Castro <[email protected]>
    Change-Id: I888545da14f413a970faf50b3ce60d12966f3f9e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142239
    Tested-by: Jenkins

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6c83b4066466..3b75c7e79ba9 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2492,8 +2492,20 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
         }
 
         return xFilter->filter( aArgs );
-        }catch(...)
-        {}
+        }
+        catch (const css::uno::RuntimeException&)
+        {
+            css::uno::Any ex(cppu::getCaughtException());
+            TOOLS_INFO_EXCEPTION("sfx.doc", "exception: " << 
exceptionToString(ex));
+        }
+        catch (const std::exception& e)
+        {
+            TOOLS_INFO_EXCEPTION("sfx.doc", "exception: " << e.what());
+        }
+        catch(...)
+        {
+            TOOLS_INFO_EXCEPTION("sfx.doc", "Unknown exception!");
+        }
     }
 
     return false;

Reply via email to