summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-25 10:42:53 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-07-06 20:29:11 +0100
commit5f26c0fb0def153311bb630d1c09cbe38437a8c6 (patch)
treeeec3624b7c776481e675764a2f0b0cb4fcb280ee /framework
parente70c4a279c2a8f93d917c0a43fc39ac017ecc463 (diff)
gridfixes: don't be too generous with exceptions:
avoid where possible (by checking beforehand), and assert when caught Conflicts: framework/source/fwe/classes/framelistanalyzer.cxx framework/source/helper/titlebarupdate.cxx framework/source/services/frame.cxx framework/source/uifactory/windowcontentfactorymanager.cxx sfx2/source/notify/eventsupplier.cxx
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/classes/framelistanalyzer.cxx9
-rw-r--r--framework/source/helper/titlebarupdate.cxx18
-rw-r--r--framework/source/services/frame.cxx8
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx8
4 files changed, 24 insertions, 19 deletions
diff --git a/framework/source/fwe/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx
index 8388683ba7d2..307ed69501b8 100644
--- a/framework/source/fwe/classes/framelistanalyzer.cxx
+++ b/framework/source/fwe/classes/framelistanalyzer.cxx
@@ -47,6 +47,7 @@
// includes of other projects
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
//_______________________________________________
// namespace
@@ -152,7 +153,7 @@ void FrameListAnalyzer::impl_analyze()
// check, if the reference frame includes the backing component.
// But look, if this analyze step is realy needed.
- if ((m_eDetectMode & E_BACKINGCOMPONENT) == E_BACKINGCOMPONENT)
+ if (((m_eDetectMode & E_BACKINGCOMPONENT) == E_BACKINGCOMPONENT) && m_xReferenceFrame.is() )
{
try
{
@@ -161,9 +162,13 @@ void FrameListAnalyzer::impl_analyze()
::rtl::OUString sModule = xModuleMgr->identify(m_xReferenceFrame);
m_bReferenceIsBacking = (sModule.equals(SERVICENAME_STARTMODULE));
}
- catch (const css::uno::Exception&)
+ catch(const css::frame::UnknownModuleException&)
{
}
+ catch(const css::uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
// check, if the reference frame includes the help module.
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index d8f2bd329c73..dd368a5cbcc2 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -38,9 +38,7 @@
#include <services.h>
#include <properties.h>
-//_________________________________________________________________________________________________________________
// interface includes
-//_________________________________________________________________________________________________________________
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -51,9 +49,7 @@
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-//_________________________________________________________________________________________________________________
// other includes
-//_________________________________________________________________________________________________________________
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/bootstrap.hxx>
@@ -62,19 +58,15 @@
#include <toolkit/unohlp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
+#include <tools/diagnose_ex.h>
-//_________________________________________________________________________________________________________________
// namespace
-
namespace framework{
-//_________________________________________________________________________________________________________________
// const
-
static const ::sal_Int32 INVALID_ICON_ID = -1;
static const ::sal_Int32 DEFAULT_ICON_ID = 0;
-//_________________________________________________________________________________________________________________
// definitions
//*****************************************************************************************************************
@@ -338,10 +330,14 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
{
try
{
- xSet->getPropertyValue( DECLARE_ASCII("IconId") ) >>= nIcon;
+ css::uno::Reference< css::beans::XPropertySetInfo > const xPSI( xSet->getPropertySetInfo(), css::uno::UNO_SET_THROW );
+ if ( xPSI->hasPropertyByName( DECLARE_ASCII("IconId") ) )
+ xSet->getPropertyValue( DECLARE_ASCII("IconId") ) >>= nIcon;
}
catch(const css::uno::Exception&)
- {}
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
// c) if b) failed ... identify the used module and retrieve set icon from module config.
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 9178979b841d..cc081c6f08ca 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -90,6 +90,7 @@
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/moduleoptions.hxx>
+#include <tools/diagnose_ex.h>
#ifdef ENABLE_ASSERTIONS
#include <rtl/strbuf.hxx>
@@ -2844,10 +2845,13 @@ void Frame::implts_setIconOnWindow()
{
try
{
- xSet->getPropertyValue( DECLARE_ASCII("IconId") )>>= nIcon;
+ css::uno::Reference< css::beans::XPropertySetInfo > const xPSI( xSet->getPropertySetInfo(), css::uno::UNO_SET_THROW );
+ if ( xPSI->hasPropertyByName( CONTROLLER_PROPNAME_ICONID ) )
+ xSet->getPropertyValue( CONTROLLER_PROPNAME_ICONID ) >>= nIcon;
}
- catch( const css::beans::UnknownPropertyException& )
+ catch( css::uno::Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index 965feec9770d..9d9f8fe442b9 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -53,6 +53,8 @@
//_________________________________________________________________________________________________________________
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/weak.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
//_________________________________________________________________________________________________________________
@@ -213,11 +215,9 @@ throw (uno::Exception, uno::RuntimeException)
{
xWindow = xFactory->createInstanceWithArgumentsAndContext( Arguments, Context );
}
- catch ( const uno::RuntimeException& )
- {
- }
- catch ( const uno::Exception& )
+ catch ( uno::Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
}