summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-11-30 11:05:16 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-11-30 11:27:42 +0900
commit7113c7152d1ec875e65e97548fa6243fc83fbc53 (patch)
tree9fa8fb3e89086e2ed06c8f210ed519331b254414 /bridges
parent2b2f6abfcc83c4701b42c92c6209a1052324f0a5 (diff)
catch by constant reference
Diffstat (limited to 'bridges')
-rw-r--r--bridges/inc/bridges/cpp_uno/bridge.hxx4
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx4
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx12
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx4
-rw-r--r--bridges/source/jni_uno/nativethreadpool.cxx4
7 files changed, 17 insertions, 17 deletions
diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index 26bb101017c3..42bca5d89e0f 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.hxx
@@ -464,9 +464,9 @@ inline void SAL_CALL cppu_cppenv_computeObjectIdentifier(
::rtl_uString_acquire( *ppOId = aRet.pData );
}
}
- catch (::com::sun::star::uno::RuntimeException &)
+ catch (const ::com::sun::star::uno::RuntimeException &)
{
- OSL_FAIL( "### RuntimeException occurred udring queryInterface()!" );
+ OSL_FAIL( "### RuntimeException occurred during queryInterface()!" );
}
}
}
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
index 4c69984b1453..6e0a2619143f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
@@ -332,7 +332,7 @@ void call(
callVirtualMethod(
(*thisPtr)[slot.index + 2], stack,
std::max< sal_Int32 >(sp - 6, 0) * sizeof (long));
- } catch (css::uno::Exception &) {
+ } catch (const css::uno::Exception &) {
void * exc = __Crun::ex_get();
char const * name = __Cimpl::ex_name();
bridges::cpp_uno::cc5_solaris_sparc64::fillUnoException(
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index aa6d523fc827..3b1aea1cd318 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -390,9 +390,9 @@ static void cpp_call(
pStackStart, ( pStack - pStackStart ),
pGPR, nGPR,
pFPR, nFPR );
- } catch (Exception &) {
+ } catch (const Exception &) {
throw;
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
OUStringBuffer buf;
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("C++ code threw "));
appendCString(buf, typeid(e).name());
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 34f34919c7ba..7577fefd1345 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -144,10 +144,10 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
::rtl_uString_acquire( *ppOId = aRet.pData );
}
}
- catch (::com::sun::star::uno::RuntimeException &)
+ catch (const ::com::sun::star::uno::RuntimeException &)
{
OSL_FAIL(
- "### RuntimeException occurred udring queryInterface()!" );
+ "### RuntimeException occurred during queryInterface()!" );
}
}
}
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index 2911ee200bff..170ba8d69b0c 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -106,7 +106,7 @@ void SAL_CALL Mapping_map_to_uno(
}
*ppUnoI = pUnoI;
}
- catch (BridgeRuntimeError & err)
+ catch (const BridgeRuntimeError & err)
{
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg(
@@ -118,7 +118,7 @@ void SAL_CALL Mapping_map_to_uno(
(void) err; // unused
#endif
}
- catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
+ catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
OSL_FAIL(
"[jni_uno bridge error] attaching current thread "
@@ -175,7 +175,7 @@ void SAL_CALL Mapping_map_to_java(
jni->DeleteLocalRef( jlocal );
}
}
- catch (BridgeRuntimeError & err)
+ catch (const BridgeRuntimeError & err)
{
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg(
@@ -187,7 +187,7 @@ void SAL_CALL Mapping_map_to_java(
(void) err; // unused
#endif
}
- catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
+ catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
OSL_FAIL(
"[jni_uno bridge error] attaching current thread to java failed!" );
@@ -537,7 +537,7 @@ void SAL_CALL uno_ext_getMapping(
(uno_Environment *)pFrom->pExtEnv, pTo, 0 );
}
}
- catch (BridgeRuntimeError & err)
+ catch (const BridgeRuntimeError & err)
{
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg(
@@ -549,7 +549,7 @@ void SAL_CALL uno_ext_getMapping(
(void) err; // unused
#endif
}
- catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
+ catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
OSL_FAIL(
"[jni_uno bridge error] attaching current thread "
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 845eb4241d13..d8496f049841 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -615,7 +615,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
buf.append( jni.get_stack_trace() );
throw BridgeRuntimeError( buf.makeStringAndClear() );
}
- catch (BridgeRuntimeError & err)
+ catch (const BridgeRuntimeError & err)
{
OUStringBuffer buf( 128 );
buf.appendAscii(
@@ -636,7 +636,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
}
return 0;
}
- catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
+ catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
OString cstr_msg(
OString( RTL_CONSTASCII_STRINGPARAM(
diff --git a/bridges/source/jni_uno/nativethreadpool.cxx b/bridges/source/jni_uno/nativethreadpool.cxx
index f068a0f7b30d..b51031756889 100644
--- a/bridges/source/jni_uno/nativethreadpool.cxx
+++ b/bridges/source/jni_uno/nativethreadpool.cxx
@@ -84,7 +84,7 @@ static void SAL_CALL executeRequest(void * data) {
env->CallObjectMethod(job->job, job->pool->execute);
env->DeleteGlobalRef(job->job);
delete job;
- } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) {
+ } catch (const jvmaccess::VirtualMachine::AttachGuard::CreationException &) {
//TODO: DeleteGlobalRef(job->job)
delete job;
}
@@ -141,7 +141,7 @@ Java_com_sun_star_lib_uno_environments_remote_NativeThreadPool_create(
return reinterpret_cast< jlong >(new Pool(
new jvmaccess::VirtualMachine(vm, env->GetVersion(), false, env),
execute, uno_threadpool_create()));
- } catch (std::bad_alloc) {
+ } catch (const std::bad_alloc &) {
throwOutOfMemory(env);
return 0;
}