diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-26 12:16:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-26 12:16:07 +0100 |
commit | 64842a9788227a5a18241ddfb5f0f679f09a007c (patch) | |
tree | 085b7d0449905aeb1175801f217410f7438d86ca | |
parent | e5a1858e05cce4bb1db495d5f9a2164a954ca371 (diff) |
put exception message into mailmerge error dialog
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 4e9d2c5fbe..544a25cafa 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()); } } |