summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-04-25 18:54:09 +0200
committerCaolán McNamara <caolanm@redhat.com>2019-05-03 17:11:45 +0200
commit580e8c72c83265c9ead0bde6845521558546b3df (patch)
tree619f5c5aa99a02b15c2a7fa1f2ab4a2ca202c27c /svtools
parent0f96df766e2b51ad49fed1e4d3f3d2660f80da12 (diff)
tdf#113834: fix crash when service host empty
The crash affects Windows, not Linux where an error popup appears instead (MacOs?) It seems the fact the url was empty triggers an exception in ucbhelper::Content ctr So let's put the lines in the try catch and log the exception. See comments of bugtracker for slight more details. Change-Id: I60e55be488632ff6e0106fde832a818c6431f58e Reviewed-on: https://gerrit.libreoffice.org/71321 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/71593
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index ec42fdf1e928..f388da0bb1d9 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -24,6 +24,7 @@
#include <svtools/PlaceEditDialog.hxx>
#include <svtools/ServerDetailsControls.hxx>
#include <vcl/lstbox.hxx>
+#include <sal/log.hxx>
#include <config_oauth2.h>
@@ -445,12 +446,11 @@ IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl, weld::Button&, void )
catch( const Exception& )
{}
- // Get the Content
- ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() );
- Sequence<OUString> aProps { "Title" };
-
try
{
+ // Get the Content
+ ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() );
+ Sequence<OUString> aProps { "Title" };
Reference< XResultSet > xResultSet( aCnt.createCursor( aProps ), UNO_QUERY_THROW );
Reference< XContentAccess > xAccess( xResultSet, UNO_QUERY_THROW );
while ( xResultSet->next() )
@@ -466,8 +466,9 @@ IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl, weld::Button&, void )
m_pDialog->m_xLBRepository->append_text(sName);
}
}
- catch ( const Exception& )
+ catch ( const Exception& e)
{
+ SAL_WARN( "svtools.dialogs", "RefreshReposHdl exception=" << e );
}
// Auto-select the first one