[Libreoffice-commits] .: stoc/source stoc/test
Takeshi Abe
tabe at kemper.freedesktop.org
Mon Dec 26 17:18:40 PST 2011
stoc/source/implementationregistration/implreg.cxx | 6 +++---
stoc/source/invocation/invocation.cxx | 2 +-
stoc/source/javaloader/javaloader.cxx | 2 +-
stoc/source/javavm/javavm.cxx | 8 ++++----
stoc/source/loader/dllcomponentloader.cxx | 2 +-
stoc/source/registry_tdprovider/functiondescription.cxx | 2 +-
stoc/source/registry_tdprovider/methoddescription.cxx | 2 +-
stoc/source/registry_tdprovider/tdiface.cxx | 4 ++--
stoc/source/security/access_controller.cxx | 2 +-
stoc/source/servicemanager/servicemanager.cxx | 6 +++---
stoc/source/simpleregistry/textualservices.cxx | 2 +-
stoc/source/tdmanager/tdmgr.cxx | 8 ++++----
stoc/source/uriproc/UriReferenceFactory.cxx | 2 +-
stoc/test/excomp/excomp.cxx | 2 +-
stoc/test/javavm/jvm_interaction/interactionhandler.cxx | 10 +++++-----
stoc/test/javavm/testjavavm.cxx | 2 +-
stoc/test/security/test_security.cxx | 4 ++--
stoc/test/testconv.cxx | 6 +++---
stoc/test/testcorefl.cxx | 2 +-
stoc/test/testiadapter.cxx | 8 ++++----
stoc/test/testintrosp.cxx | 8 ++++----
stoc/test/testproxyfac.cxx | 4 ++--
stoc/test/testregistry.cxx | 2 +-
stoc/test/testsmgr2.cxx | 2 +-
stoc/test/testsmgr_cpnt.cxx | 2 +-
25 files changed, 50 insertions(+), 50 deletions(-)
New commits:
commit c936e5062770ba100c2eddd7889b51d271c6c73c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue Dec 27 00:12:38 2011 +0900
catch exception by constant reference
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 69435a7..9fb148c 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 33496c6..fa034e6 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 b30df67..62e4a1c 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 33d8280..502031d 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 54bbeac..5b0b721 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 e7e6965..2056b8e 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 5c2bc60..bf5cb56 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 6ef2630..f51144e 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 c51d139..caa4ae9 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 45010da..f6a25e8 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 0b6f672..1ea4258 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 e768101..91c5f31 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 1370982..d06d401 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 bdca656..d896b68 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 6cc36eb..e0758c9 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 2ec3c3a..99e06be 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 f2b4f36..08ecd5b 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 70b9452..477e0d3 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 224cb53..505fceb 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 8b3c59b..28468ce 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 f04e8fb..ac9b1b0 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 ff9defa..40e8c60 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 19d94fa..5eddcf6 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 8160dfc..288d3f0 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 420fd7c..7e9296a 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" );
}
More information about the Libreoffice-commits
mailing list