summaryrefslogtreecommitdiff
path: root/binaryurp
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 /binaryurp
parent2b2f6abfcc83c4701b42c92c6209a1052324f0a5 (diff)
catch by constant reference
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/qa/test-unmarshal.cxx2
-rw-r--r--binaryurp/source/bridge.cxx10
-rw-r--r--binaryurp/source/incomingrequest.cxx12
-rw-r--r--binaryurp/source/proxy.cxx4
-rw-r--r--binaryurp/source/reader.cxx4
-rw-r--r--binaryurp/source/writer.cxx6
6 files changed, 19 insertions, 19 deletions
diff --git a/binaryurp/qa/test-unmarshal.cxx b/binaryurp/qa/test-unmarshal.cxx
index 3e8aac3fec4d..aa6c5a9b81bc 100644
--- a/binaryurp/qa/test-unmarshal.cxx
+++ b/binaryurp/qa/test-unmarshal.cxx
@@ -108,7 +108,7 @@ void Test::testTypeOfVoidSequence() {
try {
m.readType();
CPPUNIT_FAIL("exception expected");
- } catch (css::io::IOException &) {}
+ } catch (const css::io::IOException &) {}
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 6e97406d4b19..b491a2adc77f 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -259,7 +259,7 @@ void Bridge::terminate() {
}
try {
connection_->close();
- } catch (css::io::IOException & e) {
+ } catch (const css::io::IOException & e) {
SAL_INFO("binaryurp", "caught IO exception '" << e.Message << '\'');
}
assert(w.is());
@@ -289,7 +289,7 @@ void Bridge::terminate() {
(*i)->disposing(
css::lang::EventObject(
static_cast< cppu::OWeakObject * >(this)));
- } catch (css::uno::RuntimeException & e) {
+ } catch (const css::uno::RuntimeException & e) {
SAL_WARN(
"binaryurp", "caught runtime exception '" << e.Message << '\'');
}
@@ -505,10 +505,10 @@ void Bridge::revokeProxy(Proxy & proxy) {
void Bridge::freeProxy(Proxy & proxy) {
try {
makeReleaseCall(proxy.getOid(), proxy.getType());
- } catch (css::uno::RuntimeException & e) {
+ } catch (const css::uno::RuntimeException & e) {
SAL_INFO(
"binaryurp", "caught runtime exception '" << e.Message << '\'');
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
}
bool unused;
@@ -660,7 +660,7 @@ void Bridge::handleCommitChangeReply(
bool ccMode = true;
try {
throwException(exception, returnValue);
- } catch (css::bridge::InvalidProtocolChangeException &) {
+ } catch (const css::bridge::InvalidProtocolChangeException &) {
ccMode = false;
}
if (ccMode) {
diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx
index f869c958c40c..431c88505ad1 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -87,7 +87,7 @@ void IncomingRequest::execute() const {
try {
try {
isExc = !execute_throw(&ret, &outArgs);
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) +
@@ -96,7 +96,7 @@ void IncomingRequest::execute() const {
css::uno::Reference< css::uno::XInterface >());
// best-effort string conversion
}
- } catch (css::uno::RuntimeException &) {
+ } catch (const css::uno::RuntimeException &) {
css::uno::Any exc(cppu::getCaughtException());
ret = bridge_->mapCppToBinaryAny(exc);
isExc = true;
@@ -104,7 +104,7 @@ void IncomingRequest::execute() const {
if (resetCc) {
current_context::set(oldCc);
}
- } catch (css::uno::RuntimeException &) {
+ } catch (const css::uno::RuntimeException &) {
css::uno::Any exc(cppu::getCaughtException());
ret = bridge_->mapCppToBinaryAny(exc);
isExc = true;
@@ -115,12 +115,12 @@ void IncomingRequest::execute() const {
bridge_->getWriter()->queueReply(
tid_, member_, setter_, isExc, ret, outArgs, false);
return;
- } catch (css::uno::RuntimeException & e) {
+ } catch (const css::uno::RuntimeException & e) {
OSL_TRACE(
OSL_LOG_PREFIX "caught UNO runtime exception '%s'",
(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
getStr()));
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what());
}
bridge_->terminate();
@@ -162,7 +162,7 @@ bool IncomingRequest::execute_throw(
if (prov.is()) {
try {
ifc = prov->getInstance(oid_);
- } catch (css::container::NoSuchElementException & e) {
+ } catch (const css::container::NoSuchElementException & e) {
OSL_TRACE(
(OSL_LOG_PREFIX "initial element '%s':"
" NoSuchElementException '%s'"),
diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 75cca80f55c1..a5794762163f 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -116,7 +116,7 @@ void Proxy::do_dispatch(
try {
try {
do_dispatch_throw(member, returnValue, arguments, exception);
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) +
@@ -125,7 +125,7 @@ void Proxy::do_dispatch(
css::uno::Reference< css::uno::XInterface >());
// best-effort string conversion
}
- } catch (css::uno::RuntimeException &) {
+ } catch (const css::uno::RuntimeException &) {
css::uno::Any exc(cppu::getCaughtException());
uno_copyAndConvertData(
*exception, &exc,
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index c151e985a629..c052fadc5629 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -145,9 +145,9 @@ void Reader::run() {
}
block.done();
}
- } catch (css::uno::Exception & e) {
+ } catch (const css::uno::Exception & e) {
SAL_WARN("binaryurp", "caught UNO exception '" << e.Message << '\'');
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
}
bridge_->terminate();
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 42a238879bf2..5aca57b108eb 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -189,11 +189,11 @@ void Writer::run() {
}
}
}
- } catch (css::uno::Exception & e) {
+ } catch (const css::uno::Exception & e) {
OSL_TRACE(
OSL_LOG_PREFIX "caught UNO exception '%s'",
rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
- } catch (std::exception & e) {
+ } catch (const std::exception & e) {
OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what());
}
bridge_->terminate();
@@ -447,7 +447,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
rtl_copyMemory(s.getArray() + s.getLength() - k, p, k);
try {
bridge_->getConnection()->write(s);
- } catch (css::io::IOException & e) {
+ } catch (const css::io::IOException & e) {
css::uno::Any exc(cppu::getCaughtException());
throw css::lang::WrappedTargetRuntimeException(
(rtl::OUString(