diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-06-21 16:11:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-06-21 16:46:48 +0200 |
commit | bfbdb2d4f443fc13e10ec33d112bd0c23584b658 (patch) | |
tree | 6e62498f6dfef1aad5903af1406e129e5d545b3c | |
parent | 559d2575ba4a13f06b330a079035d5243fef980f (diff) |
sidebar: Improve runtime error reporting (mostly missing .ui).
Change-Id: If7e0f24eab77028ddbfdb17dff82679b214efc74
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 12 |
2 files changed, 12 insertions, 10 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 54314af50922..80023576a831 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 8806c4cbac3a..e79896e4d833 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(), |