[Libreoffice-commits] core.git: sfx2/source

Jan Holesovsky kendy at collabora.com
Thu Jan 14 02:57:51 PST 2016


 sfx2/source/doc/sfxbasemodel.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 643a33486e2c9b2700c416090dfa6bbe75ce47ae
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Jan 14 11:52:18 2016 +0100

    sfx2: Convert the exception to one that we actually announce.
    
    Otherwise saving to a non-existing http:// URL leads to a crash.
    
    Change-Id: Ia4b49e2872616545dcedb2fc5553cf5a20a1f97d

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9c21b98..850de4d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1696,7 +1696,16 @@ void SAL_CALL SfxBaseModel::storeToURL( const   OUString&                   rURL
     {
         m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeToURL" );
         SfxSaveGuard aSaveGuard(this, m_pData, false);
-        impl_store( rURL, rArgs, true );
+        try {
+            impl_store(rURL, rArgs, true);
+        }
+        catch (const uno::Exception &e)
+        {
+            // convert to the exception we announce in the throw
+            // (eg. neon likes to throw InteractiveAugmentedIOException which
+            // is not an io::IOException)
+            throw io::IOException(e.Message, e.Context);
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list