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

Jan Holesovsky kendy at suse.cz
Fri Jun 21 07:48:33 PDT 2013


 sfx2/source/sidebar/SidebarController.cxx |   10 ++--------
 vcl/source/window/builder.cxx             |   12 ++++++++++--
 2 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit bfbdb2d4f443fc13e10ec33d112bd0c23584b658
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Jun 21 16:11:53 2013 +0200

    sidebar: Improve runtime error reporting (mostly missing .ui).
    
    Change-Id: If7e0f24eab77028ddbfdb17dff82679b214efc74

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 54314af..8002357 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -718,15 +718,9 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement (
 
         return xUIElement;
     }
-    catch(Exception& rException)
+    catch(const Exception& rException)
     {
-        OSL_TRACE("caught exception: %s",
-            OUStringToOString(rException.Message, RTL_TEXTENCODING_ASCII_US).getStr());
-        // For some reason we can not create the actual panel.
-        // Probably because its factory was not properly registered.
-        // TODO: provide feedback to developer to better pinpoint the
-        // source of the error.
-
+        SAL_WARN("sfx2.sidebar", "Cannot create panel: " << rException.Message);
         return NULL;
     }
 }
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 8806c4c..e79896e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -162,9 +162,17 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
     if (!bEN_US)
         loadTranslations(aLocale, sUri);
 
-    xmlreader::XmlReader reader(sUri);
+    try
+    {
+        xmlreader::XmlReader reader(sUri);
 
-    handleChild(pParent, reader);
+        handleChild(pParent, reader);
+    }
+    catch (const ::com::sun::star::uno::Exception &rExcept)
+    {
+        SAL_WARN("vcl.layout", "Unable to read .ui file: " << rExcept.Message);
+        throw;
+    }
 
     //Set Mnemonic widgets when everything has been imported
     for (std::vector<MnemonicWidgetMap>::iterator aI = m_pParserState->m_aMnemonicWidgetMaps.begin(),


More information about the Libreoffice-commits mailing list