catch exception by constant reference

This commit is contained in:
Takeshi Abe
2011-12-25 15:08:11 +09:00
parent 8b18c70b99
commit 8cc98837d3
33 changed files with 134 additions and 214 deletions

View File

@@ -122,13 +122,9 @@ ProviderCache::getAllProviders() throw ( RuntimeException )
xScriptProvider = createProvider( h_it->second );
providers[ providerIndex++ ] = xScriptProvider;
}
catch ( Exception& e )
catch ( const Exception& )
{
::rtl::OUString temp = OUSTR( "ProviderCache::getAllProviders: failed to create provider, " );
temp.concat( e.Message );
DBG_UNHANDLED_EXCEPTION();
//throw RuntimeException( temp.concat( e.Message ),
// Reference< XInterface >() );
}
}
}
@@ -187,7 +183,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
}
}
}
catch ( Exception &e )
catch ( const Exception &e )
{
::rtl::OUString temp = OUSTR(
"ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for " );
@@ -204,7 +200,7 @@ ProviderCache::createProvider( ProviderDetails& details ) throw ( RuntimeExcepti
details.provider.set(
details.factory->createInstanceWithArgumentsAndContext( m_Sctx, m_xContext ), UNO_QUERY_THROW );
}
catch ( RuntimeException& e )
catch ( const RuntimeException& e )
{
::rtl::OUString temp(RTL_CONSTASCII_USTRINGPARAM("ProviderCache::createProvider() Error creating provider from factory!!!\n"));
throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );