Kaydet (Commit) d5ccb733 authored tarafından Caolán McNamara's avatar Caolán McNamara

catch by const reference

üst 85143ce6
...@@ -126,7 +126,7 @@ struct DisposeControlModel : public ::std::unary_function< Reference< XControlMo ...@@ -126,7 +126,7 @@ struct DisposeControlModel : public ::std::unary_function< Reference< XControlMo
{ {
::comphelper::disposeComponent( _rxModel ); ::comphelper::disposeComponent( _rxModel );
} }
catch( const Exception& ) catch (const Exception&)
{ {
OSL_TRACE( "DisposeControlModel::(): caught an exception while disposing a component!" ); OSL_TRACE( "DisposeControlModel::(): caught an exception while disposing a component!" );
} }
...@@ -657,11 +657,16 @@ void ControlModelContainerBase::removeByName( const ::rtl::OUString& aName ) thr ...@@ -657,11 +657,16 @@ void ControlModelContainerBase::removeByName( const ::rtl::OUString& aName ) thr
mbGroupsUpToDate = sal_False; mbGroupsUpToDate = sal_False;
if ( xPS.is() ) if ( xPS.is() )
{
try try
{ {
xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, makeAny( Reference< resource::XStringResourceResolver >() ) ); xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, makeAny( Reference< resource::XStringResourceResolver >() ) );
} }
catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
}
// our "tab controller model" has potentially changed -> notify this // our "tab controller model" has potentially changed -> notify this
implNotifyTabModelChange( aName ); implNotifyTabModelChange( aName );
...@@ -849,7 +854,7 @@ namespace ...@@ -849,7 +854,7 @@ namespace
Reference< XPropertySet > xModelProps( _rxModel, UNO_QUERY ); Reference< XPropertySet > xModelProps( _rxModel, UNO_QUERY );
xModelProps->getPropertyValue( getStepPropertyName() ) >>= nStep; xModelProps->getPropertyValue( getStepPropertyName() ) >>= nStep;
} }
catch( const Exception& ) catch (const Exception&)
{ {
OSL_TRACE( "lcl_getDialogStep: caught an exception while determining the dialog page!" ); OSL_TRACE( "lcl_getDialogStep: caught an exception while determining the dialog page!" );
} }
...@@ -1206,11 +1211,11 @@ void ResourceListener::startListening( ...@@ -1206,11 +1211,11 @@ void ResourceListener::startListening(
m_bListening = true; m_bListening = true;
// --- SAFE --- // --- SAFE ---
} }
catch ( RuntimeException& ) catch (const RuntimeException&)
{ {
throw; throw;
} }
catch ( Exception& ) catch (const Exception&)
{ {
} }
} }
...@@ -1241,11 +1246,11 @@ void ResourceListener::stopListening() ...@@ -1241,11 +1246,11 @@ void ResourceListener::stopListening()
xModifyBroadcaster->removeModifyListener( xThis ); xModifyBroadcaster->removeModifyListener( xThis );
} }
catch ( RuntimeException& ) catch (const RuntimeException&)
{ {
throw; throw;
} }
catch ( Exception& ) catch (const Exception&)
{ {
} }
} }
...@@ -1270,11 +1275,11 @@ throw ( RuntimeException ) ...@@ -1270,11 +1275,11 @@ throw ( RuntimeException )
{ {
xListener->modified( aEvent ); xListener->modified( aEvent );
} }
catch ( RuntimeException& ) catch (const RuntimeException&)
{ {
throw; throw;
} }
catch ( Exception& ) catch (const Exception&)
{ {
} }
} }
...@@ -1312,11 +1317,11 @@ throw ( RuntimeException ) ...@@ -1312,11 +1317,11 @@ throw ( RuntimeException )
{ {
xListener->disposing( Source ); xListener->disposing( Source );
} }
catch ( RuntimeException& ) catch (const RuntimeException&)
{ {
throw; throw;
} }
catch ( Exception& ) catch (const Exception&)
{ {
} }
} }
...@@ -1342,11 +1347,11 @@ throw ( RuntimeException ) ...@@ -1342,11 +1347,11 @@ throw ( RuntimeException )
{ {
xModifyBroadcaster->removeModifyListener( xThis ); xModifyBroadcaster->removeModifyListener( xThis );
} }
catch ( RuntimeException& ) catch (const RuntimeException&)
{ {
throw; throw;
} }
catch ( Exception& ) catch (const Exception&)
{ {
} }
} }
...@@ -1412,7 +1417,7 @@ void ControlContainerBase::ImplRemoveControl( Reference< XControlModel >& rxMode ...@@ -1412,7 +1417,7 @@ void ControlContainerBase::ImplRemoveControl( Reference< XControlModel >& rxMode
Reference< XComponent > const xControlComp( xCtrl, UNO_QUERY_THROW ); Reference< XComponent > const xControlComp( xCtrl, UNO_QUERY_THROW );
xControlComp->dispose(); xControlComp->dispose();
} }
catch( Exception const & ) catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -1608,8 +1613,11 @@ void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw( ...@@ -1608,8 +1613,11 @@ void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw(
{ {
ImplInsertControl( xModel, aName ); ImplInsertControl( xModel, aName );
} }
catch ( const RuntimeException& e ) { throw; } catch (const RuntimeException&)
catch( const Exception& ) {
throw;
}
catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -1626,8 +1634,11 @@ void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(R ...@@ -1626,8 +1634,11 @@ void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(R
{ {
ImplRemoveControl( xModel ); ImplRemoveControl( xModel );
} }
catch ( const RuntimeException& e ) { throw; } catch (const RuntimeException&)
catch( const Exception& ) {
throw;
}
catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -1645,8 +1656,11 @@ void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw( ...@@ -1645,8 +1656,11 @@ void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw(
if ( xModel.is() ) if ( xModel.is() )
ImplRemoveControl( xModel ); ImplRemoveControl( xModel );
} }
catch ( const RuntimeException& e ) { throw; } catch (const RuntimeException&)
catch( const Exception& ) {
throw;
}
catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -1659,8 +1673,11 @@ void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw( ...@@ -1659,8 +1673,11 @@ void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw(
{ {
ImplInsertControl( xModel, aName ); ImplInsertControl( xModel, aName );
} }
catch ( const RuntimeException& e ) { throw; } catch (const RuntimeException&)
catch( const Exception& ) {
throw;
}
catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -1792,8 +1809,7 @@ void lcl_ApplyResolverToNestedContainees( const Reference< resource::XStringRes ...@@ -1792,8 +1809,7 @@ void lcl_ApplyResolverToNestedContainees( const Reference< resource::XStringRes
else else
xPropertySet->setPropertyValue( aPropName, xNewStringResourceResolver ); xPropertySet->setPropertyValue( aPropName, xNewStringResourceResolver );
} }
/*catch ( NoSuchElementException& )*/ // that's nonsense, this is never thrown above ... catch (const Exception&)
catch ( const Exception& )
{ {
} }
...@@ -1859,7 +1875,7 @@ uno::Reference< graphic::XGraphic > ControlContainerBase::Impl_getGraphicFromURL ...@@ -1859,7 +1875,7 @@ uno::Reference< graphic::XGraphic > ControlContainerBase::Impl_getGraphicFromURL
xGraphic = xProvider->queryGraphic( aMediaProperties ); xGraphic = xProvider->queryGraphic( aMediaProperties );
} }
} }
catch( const Exception& ) catch (const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment