[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

Noel Power noelp at kemper.freedesktop.org
Wed Aug 10 07:39:03 PDT 2011


 sw/source/ui/config/mailconfigpage.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit cd2474472cd2d2abcc0dc05d7058f5079146c9fd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 26 11:16:07 2011 +0000

    put exception message into mailmerge error dialog
    
    Signed-off-by: Noel Power <noel.power at novell.com>

diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 4e9d2c5..544a25c 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -337,6 +337,8 @@ void SwTestAccountSettingsDialog::Test()
 {
     uno::Reference<XMultiServiceFactory> rMgr = ::comphelper::getProcessServiceFactory();
 
+    rtl::OUString sException;
+
     bool bIsLoggedIn = false;
     bool bIsServer = false;
     if (rMgr.is())
@@ -412,9 +414,9 @@ void SwTestAccountSettingsDialog::Test()
             if( xMailService->isConnected())
                 xMailService->disconnect();
         }
-        catch(uno::Exception&)
+        catch (const uno::Exception& e)
         {
-            OSL_FAIL("exception caught");
+            sException = e.Message;
         }
     }
 
@@ -437,7 +439,10 @@ void SwTestAccountSettingsDialog::Test()
 
     if(!bIsServer || !bIsLoggedIn )
     {
-        m_eErrorsED.SetText( m_sErrorServer );
+        rtl::OUStringBuffer aErrorMessage(m_sErrorServer);
+        if (!sException.isEmpty())
+            aErrorMessage.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n--\n")).append(sException);
+        m_eErrorsED.SetText(aErrorMessage.makeStringAndClear());
     }
 }
 


More information about the Libreoffice-commits mailing list