diff options
-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(), |