summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-12-27 00:12:38 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-12-27 10:17:15 +0900
commitc936e5062770ba100c2eddd7889b51d271c6c73c (patch)
tree7ab2701dce9bfea7ac5b3b319a05a1aeb4a25cad /stoc
parent1d55be916472270d23f7d3ff7513dd6df6dc1e46 (diff)
catch exception by constant reference
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/implementationregistration/implreg.cxx6
-rw-r--r--stoc/source/invocation/invocation.cxx2
-rw-r--r--stoc/source/javaloader/javaloader.cxx2
-rw-r--r--stoc/source/javavm/javavm.cxx8
-rw-r--r--stoc/source/loader/dllcomponentloader.cxx2
-rw-r--r--stoc/source/registry_tdprovider/functiondescription.cxx2
-rw-r--r--stoc/source/registry_tdprovider/methoddescription.cxx2
-rw-r--r--stoc/source/registry_tdprovider/tdiface.cxx4
-rw-r--r--stoc/source/security/access_controller.cxx2
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx6
-rw-r--r--stoc/source/simpleregistry/textualservices.cxx2
-rw-r--r--stoc/source/tdmanager/tdmgr.cxx8
-rw-r--r--stoc/source/uriproc/UriReferenceFactory.cxx2
-rw-r--r--stoc/test/excomp/excomp.cxx2
-rw-r--r--stoc/test/javavm/jvm_interaction/interactionhandler.cxx10
-rw-r--r--stoc/test/javavm/testjavavm.cxx2
-rw-r--r--stoc/test/security/test_security.cxx4
-rw-r--r--stoc/test/testconv.cxx6
-rw-r--r--stoc/test/testcorefl.cxx2
-rw-r--r--stoc/test/testiadapter.cxx8
-rw-r--r--stoc/test/testintrosp.cxx8
-rw-r--r--stoc/test/testproxyfac.cxx4
-rw-r--r--stoc/test/testregistry.cxx2
-rw-r--r--stoc/test/testsmgr2.cxx2
-rw-r--r--stoc/test/testsmgr_cpnt.cxx2
25 files changed, 50 insertions, 50 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 69435a70d9ca..9fb148ca629e 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -1025,7 +1025,7 @@ static void insert_singletons(
buf.makeStringAndClear(), Reference< XInterface >() );
}
}
- catch (container::NoSuchElementException & exc)
+ catch (const container::NoSuchElementException & exc)
{
throw RuntimeException(
OUSTR("cannot get service type description: ") + exc.Message,
@@ -1564,7 +1564,7 @@ void ImplementationRegistration::prepareRegister(
{
throw;
}
- catch( InvalidRegistryException & e )
+ catch( const InvalidRegistryException & e )
{
OUStringBuffer buf;
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
@@ -1575,7 +1575,7 @@ void ImplementationRegistration::prepareRegister(
throw CannotRegisterImplementationException(
buf.makeStringAndClear(), Reference< XInterface > () );
}
- catch( MergeConflictException & e )
+ catch( const MergeConflictException & e )
{
OUStringBuffer buf;
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 33496c6a3ed7..fa034e63521f 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -614,7 +614,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value )
{
throw;
}
- catch (Exception & exc)
+ catch (const Exception & exc)
{
throw InvocationTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM("exception occurred in setValue(): ") ) +
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index b30df67e221d..62e4a1c0e741 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -417,7 +417,7 @@ css::uno::Reference<XInterface> SAL_CALL JavaComponentLoader_CreateInstance(cons
pStaticRef = new css::uno::Reference< XInterface > ( xRet );
}
}
- catch(RuntimeException & runtimeException) {
+ catch(const RuntimeException & runtimeException) {
OString message = OUStringToOString(runtimeException.Message, RTL_TEXTENCODING_ASCII_US);
osl_trace("javaloader - could not init javaloader cause of %s", message.getStr());
throw;
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 33d8280a764e..502031d5ef47 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -549,7 +549,7 @@ void initVMConfiguration(
try {
getINetPropsFromConfig(&jvm, xSMgr, xCtx);
}
- catch(css::uno::Exception & exception) {
+ catch(const css::uno::Exception & exception) {
#if OSL_DEBUG_LEVEL > 1
rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US);
OSL_TRACE("javavm.cxx: can not get INetProps cause of >%s<", message.getStr());
@@ -561,7 +561,7 @@ void initVMConfiguration(
try {
getDefaultLocaleFromConfig(&jvm, xSMgr,xCtx);
}
- catch(css::uno::Exception & exception) {
+ catch(const css::uno::Exception & exception) {
#if OSL_DEBUG_LEVEL > 1
rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US);
OSL_TRACE("javavm.cxx: can not get locale cause of >%s<", message.getStr());
@@ -574,7 +574,7 @@ void initVMConfiguration(
{
getJavaPropsFromSafetySettings(&jvm, xSMgr, xCtx);
}
- catch(css::uno::Exception & exception) {
+ catch(const css::uno::Exception & exception) {
#if OSL_DEBUG_LEVEL > 1
rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US);
OSL_TRACE("javavm.cxx: couldn't get safety settings because of >%s<", message.getStr());
@@ -1480,7 +1480,7 @@ void JavaVirtualMachine::registerConfigChangesListener()
if (m_xJavaConfiguration.is())
m_xJavaConfiguration->addContainerListener(this);
}
- }catch( css::uno::Exception & e)
+ }catch(const css::uno::Exception & e)
{
#if OSL_DEBUG_LEVEL > 1
rtl::OString message = rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index 54bbeac7c710..5b0b7217f1b9 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -187,7 +187,7 @@ OUString DllComponentLoader::expand_url( OUString const & url )
{
return cppu::bootstrap_expandUri( url );
}
- catch ( IllegalArgumentException & e )
+ catch ( const IllegalArgumentException & e )
{
throw RuntimeException( e.Message, e.Context );
}
diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx
index e7e6965d8c0e..2056b8e7d40c 100644
--- a/stoc/source/registry_tdprovider/functiondescription.cxx
+++ b/stoc/source/registry_tdprovider/functiondescription.cxx
@@ -81,7 +81,7 @@ FunctionDescription::getExceptions() const {
css::uno::Any any;
try {
any = m_manager->getByHierarchicalName(name);
- } catch (css::container::NoSuchElementException & e) {
+ } catch (const css::container::NoSuchElementException & e) {
throw new css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/stoc/source/registry_tdprovider/methoddescription.cxx b/stoc/source/registry_tdprovider/methoddescription.cxx
index 5c2bc609b1a3..bf5cb56b6bf8 100644
--- a/stoc/source/registry_tdprovider/methoddescription.cxx
+++ b/stoc/source/registry_tdprovider/methoddescription.cxx
@@ -100,7 +100,7 @@ css::uno::Reference< css::reflection::XTypeDescription > Parameter::getType()
return css::uno::Reference< css::reflection::XTypeDescription >(
m_manager->getByHierarchicalName(m_typeName),
css::uno::UNO_QUERY_THROW);
- } catch (css::container::NoSuchElementException & e) {
+ } catch (const css::container::NoSuchElementException & e) {
throw new css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx
index 6ef263056b2e..f51144e0b088 100644
--- a/stoc/source/registry_tdprovider/tdiface.cxx
+++ b/stoc/source/registry_tdprovider/tdiface.cxx
@@ -543,7 +543,7 @@ InterfaceTypeDescriptionImpl::getBaseTypes() throw (RuntimeException) {
for (sal_Int32 i = 0; i < _aBaseTypes.getLength(); ++i) {
try {
_xTDMgr->getByHierarchicalName(_aBaseTypes[i]) >>= tds[i];
- } catch (NoSuchElementException & e) {
+ } catch (const NoSuchElementException & e) {
throw RuntimeException(
(OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -571,7 +571,7 @@ InterfaceTypeDescriptionImpl::getOptionalBaseTypes() throw (RuntimeException) {
try {
_xTDMgr->getByHierarchicalName(_aOptionalBaseTypes[i])
>>= tds[i];
- } catch (NoSuchElementException & e) {
+ } catch (const NoSuchElementException & e) {
throw RuntimeException(
(OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index c51d1399723c..caa4ae97fbf6 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -845,7 +845,7 @@ PermissionCollection AccessController::getEffectivePermissions(
checkAndClearPostPoned();
return ret;
}
- catch (security::AccessControlException & exc) // wrapped into DeploymentException
+ catch (const security::AccessControlException & exc) // wrapped into DeploymentException
{
clearPostPoned(); // safety: exception could have happened before checking postponed?
OUStringBuffer buf( 64 );
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 45010dab0fcb..f6a25e883b9a 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -982,7 +982,7 @@ void OServiceManager::disposing()
if( xComp.is() )
xComp->dispose();
}
- catch (RuntimeException & exc)
+ catch (const RuntimeException & exc)
{
#if OSL_DEBUG_LEVEL > 1
OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
@@ -1204,7 +1204,7 @@ Reference< XInterface > OServiceManager::createInstanceWithContext(
}
}
}
- catch (lang::DisposedException & exc)
+ catch (const lang::DisposedException & exc)
{
#if OSL_DEBUG_LEVEL > 1
OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
@@ -1268,7 +1268,7 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext(
}
}
}
- catch (lang::DisposedException & exc)
+ catch (const lang::DisposedException & exc)
{
#if OSL_DEBUG_LEVEL > 1
OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx
index 0b6f672342f8..1ea425883aa9 100644
--- a/stoc/source/simpleregistry/textualservices.cxx
+++ b/stoc/source/simpleregistry/textualservices.cxx
@@ -328,7 +328,7 @@ void Parser::handleComponent() {
}
try {
attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_);
- } catch (rtl::MalformedUriException & e) {
+ } catch (const rtl::MalformedUriException & e) {
throw css::registry::InvalidRegistryException(
(reader_.getUrl() +
rtl::OUString(
diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx
index e768101e4ef6..91c5f31bd6db 100644
--- a/stoc/source/tdmanager/tdmgr.cxx
+++ b/stoc/source/tdmanager/tdmgr.cxx
@@ -452,7 +452,7 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
{
xNewTD = xTDEnum->nextTypeDescription();
}
- catch (container::NoSuchElementException & exc)
+ catch (const container::NoSuchElementException & exc)
{
throw lang::IllegalArgumentException(
OUSTR("NoSuchElementException occurred: ") +
@@ -473,7 +473,7 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
{
check( xNewTD, xExistingTD );
}
- catch (IncompatibleTypeException & exc)
+ catch (const IncompatibleTypeException & exc)
{
throw lang::IllegalArgumentException(
OUSTR("Rejecting types due to "
@@ -488,13 +488,13 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
}
}
}
- catch (reflection::NoSuchTypeNameException & exc)
+ catch (const reflection::NoSuchTypeNameException & exc)
{
throw lang::IllegalArgumentException(
OUSTR("NoSuchTypeNameException occurred: ") + exc.Message,
static_cast<OWeakObject *>(this), -1 /* unknown */ );
}
- catch (reflection::InvalidTypeNameException & exc)
+ catch (const reflection::InvalidTypeNameException & exc)
{
throw lang::IllegalArgumentException(
OUSTR("InvalidTypeNameException occurred: ") + exc.Message,
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx
index 13709823d903..d06d4018087a 100644
--- a/stoc/source/uriproc/UriReferenceFactory.cxx
+++ b/stoc/source/uriproc/UriReferenceFactory.cxx
@@ -420,7 +420,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse(
serviceName, m_context);
} catch (css::uno::RuntimeException &) {
throw;
- } catch (css::uno::Exception & e) {
+ } catch (const css::uno::Exception & e) {
throw css::lang::WrappedTargetRuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("creating service "))
+ serviceName,
diff --git a/stoc/test/excomp/excomp.cxx b/stoc/test/excomp/excomp.cxx
index bdca65649a90..d896b6890dbd 100644
--- a/stoc/test/excomp/excomp.cxx
+++ b/stoc/test/excomp/excomp.cxx
@@ -108,7 +108,7 @@ SAL_IMPLEMENT_MAIN()
compName2,
Reference< XSimpleRegistry >() );
}
- catch( CannotRegisterImplementationException& e)
+ catch(const CannotRegisterImplementationException& e)
{
TEST_ENSHURE( e.Message.getLength(), OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
index 6cc36eba5bcc..e0758c93a99e 100644
--- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
+++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
@@ -153,27 +153,27 @@ sal_Bool test1(const Reference< XMultiServiceFactory > & xMgr )
{
anyVM = xVM->getJavaVM( Sequence<sal_Int8>(arId, 16));
}
- catch (JavaNotConfiguredException& e)
+ catch (const JavaNotConfiguredException& e)
{
OString msg= OUStringToOString(e.Message, osl_getThreadTextEncoding());
printf("JavaNotConfiguredException: %s\n", msg.getStr());
}
- catch (JavaVMCreationFailureException& e)
+ catch (const JavaVMCreationFailureException& e)
{
OString msg= OUStringToOString(e.Message, osl_getThreadTextEncoding());
printf("JavaVMCreationFailureException: %s\n", msg.getStr());
}
- catch (MissingJavaRuntimeException& e)
+ catch (const MissingJavaRuntimeException& e)
{
OString msg= OUStringToOString(e.Message, osl_getThreadTextEncoding());
printf("MissingJavaRuntimeException: %s\n", msg.getStr());
}
- catch (JavaDisabledException& e)
+ catch (const JavaDisabledException& e)
{
OString msg= OUStringToOString(e.Message, osl_getThreadTextEncoding());
printf("JavaDisabledException: %s\n", msg.getStr());
}
- catch (RuntimeException & e)
+ catch (const RuntimeException & e)
{
OString msg= OUStringToOString(e.Message, osl_getThreadTextEncoding());
printf("###RuntimeException: %s\n", msg.getStr());
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index 2ec3c3a80c4f..99e06be062e8 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -151,7 +151,7 @@ SAL_IMPLEMENT_MAIN()
bSucc = testJavaVM( xMgr );
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
OSL_FAIL( "### exception occurred!" );
OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/stoc/test/security/test_security.cxx b/stoc/test/security/test_security.cxx
index f2b4f36337aa..08ecd5b17762 100644
--- a/stoc/test/security/test_security.cxx
+++ b/stoc/test/security/test_security.cxx
@@ -173,7 +173,7 @@ Any user_CurrentContext::getValueByName( OUString const & name )
check; \
} \
} \
- catch (RuntimeException & exc) \
+ catch (const RuntimeException & exc) \
{ \
OUStringBuffer buf( 64 ); \
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[line ") ); \
@@ -513,7 +513,7 @@ SAL_IMPLEMENT_MAIN()
::fprintf( stderr, "security test succeeded.\n" );
return 0;
}
- catch (Exception & exc)
+ catch (const Exception & exc)
{
OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
::fprintf( stderr, "[security test] error: %s!\n", str.getStr() );
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index 70b94523231a..477e0d322c70 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -183,7 +183,7 @@ static sal_Bool convertTo( const Type & rDestType, const Any & rVal, sal_Bool bE
aRet = s_xConverter->convertTo( rVal, rDestType );
bCanConvert = sal_True;
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
aExcMsg = OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US );
}
@@ -237,7 +237,7 @@ static sal_Bool convertTo( const Type & rDestType, const Any & rVal, sal_Bool bE
aRet2 = s_xConverter->convertTo( aRet, rVal.getValueType() );
bReConvert = sal_True;
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
aExcMsg = OUStringToOString( rExc.Message, RTL_TEXTENCODING_ISO_8859_1 );
}
@@ -690,7 +690,7 @@ SAL_IMPLEMENT_MAIN()
test_Conversion( xMgr );
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
OSL_FAIL( "### exception occurred!" );
OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index 224cb53253e3..505fceb9bd35 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -399,7 +399,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XComponent >( xContext, UNO_QUERY )->dispose();
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
OSL_FAIL( "### exception occurred!" );
OString aMsg(
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index 8b3c59b0a8f3..28468ce25f1d 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -530,7 +530,7 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
bImplementedMethod = false;
}
}
- catch (IllegalArgumentException & rExc)
+ catch (const IllegalArgumentException & rExc)
{
// thrown by raiseException() call
InvocationTargetException aExc;
@@ -905,7 +905,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
return sal_False;
}
- catch (IllegalArgumentException aExc)
+ catch (const IllegalArgumentException &aExc)
{
OSL_ENSURE( aExc.ArgumentPosition == 5 &&
// aExc.Context == xLBT &&
@@ -938,7 +938,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
return sal_False;
}
}
- catch (Exception & aExc)
+ catch (const Exception & aExc)
{
OSL_ENSURE( //aExc.Context == xLBT &&
aExc.Message.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...")),
@@ -1058,7 +1058,7 @@ SAL_IMPLEMENT_MAIN()
}
}
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
fprintf( stderr, "> exception occurred: " );
OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index f04e8fb9cf90..ac9b1b03df57 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -1054,7 +1054,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
{
xPropSet->setPropertyValue( aPropName, aNewVal );
}
- catch(UnknownPropertyException e1)
+ catch(const UnknownPropertyException &)
{
}
@@ -1088,7 +1088,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
{
Property aGetProp = xAccess->getProperty( aWDemandedName, nConcepts );
}
- catch (RuntimeException e1)
+ catch (const RuntimeException &)
{
aErrorStr = "property \"";
aErrorStr += aDemandedName;
@@ -1174,7 +1174,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
Reference< XIdlMethod > xGetMethod = xAccess->getMethod( aWDemandedName, nRealConcepts );
TEST_ENSHURE( xGetMethod == rxMethod , aErrorStr.getStr() );
}
- catch (RuntimeException e1)
+ catch (const RuntimeException &)
{
aErrorStr = "method \"";
aErrorStr += aDemandedName;
@@ -1237,7 +1237,7 @@ SAL_IMPLEMENT_MAIN()
bSucc = test_introsp( xMgr, xRefl, xIntrosp );
fprintf(stderr, "after test_introsp\n" );
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
OSL_FAIL( "### exception occurred!" );
OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx
index ff9defabc311..40e8c60d97f4 100644
--- a/stoc/test/testproxyfac.cxx
+++ b/stoc/test/testproxyfac.cxx
@@ -225,7 +225,7 @@ static void test_proxyfac_(
Reference< registry::XRegistryKey >(
xMaster, UNO_QUERY_THROW );
}
- catch (lang::DisposedException & exc)
+ catch (const lang::DisposedException & exc)
{
if (! exc.Message.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("my test exception") ))
@@ -328,7 +328,7 @@ SAL_IMPLEMENT_MAIN()
xProxyFac );
uno_dumpEnvironment( stdout, cpp_env.get(), 0 );
}
- catch (Exception & rExc)
+ catch (const Exception & rExc)
{
(void)rExc;
OSL_ENSURE(
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index 19d94fa7365c..5eddcf6aa7e3 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -649,7 +649,7 @@ void test_DefaultRegistry(
{
xReg->close();
}
- catch(InvalidRegistryException& e)
+ catch(const InvalidRegistryException& e)
{
(void)e;
TEST_ENSHURE(0, OUStringToOString(e.Message,RTL_TEXTENCODING_ASCII_US).getStr());
diff --git a/stoc/test/testsmgr2.cxx b/stoc/test/testsmgr2.cxx
index 8160dfc20e5a..288d3f08b70d 100644
--- a/stoc/test/testsmgr2.cxx
+++ b/stoc/test/testsmgr2.cxx
@@ -107,7 +107,7 @@ SAL_IMPLEMENT_MAIN()
fprintf( stderr, "missing DisposedException!\n" );
return 1;
}
- catch ( Exception & e )
+ catch ( const Exception & e )
{
OString o = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US );
printf( "%s\n" , o.getStr() );
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index 420fd7c7133e..7e9296a75938 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -258,7 +258,7 @@ extern "C" void SAL_CALL test_ServiceManager()
// register the services via writeComponentRegInfo (see at end of this file)
xInst->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), atUModule2, Reference< XSimpleRegistry >() );
}
- catch( CannotRegisterImplementationException e ) {
+ catch(const CannotRegisterImplementationException &) {
TEST_ENSHURE( 0, "register implementation failed" );
}