diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-26 11:16:07 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-08-10 15:27:45 +0100 |
commit | cd2474472cd2d2abcc0dc05d7058f5079146c9fd (patch) | |
tree | 7a4b40dd390f91676b890ceafd9d5e60f9bff9ac | |
parent | 7db9cbb45b49b23dd63659a89cdd59d87b67a7cd (diff) |
put exception message into mailmerge error dialog
Signed-off-by: Noel Power <noel.power@novell.com>
-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()); } } |