summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-02-06 11:02:07 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-02-06 11:02:07 +0100
commitb72d4592efe190892d2ed0d106a7793444c2c695 (patch)
tree40f79b14848a224451c3a6cd136a2d371671af87
parentFixed typo in IceGrid ACM client timeout property name (ICE-8623) (diff)
downloadice-b72d4592efe190892d2ed0d106a7793444c2c695.tar.bz2
ice-b72d4592efe190892d2ed0d106a7793444c2c695.tar.xz
ice-b72d4592efe190892d2ed0d106a7793444c2c695.zip
Catch exception by const& when appropriate (ICE-8632)
-rw-r--r--cpp/test/Glacier2/sessionHelper/Client.cpp9
-rw-r--r--cpp/test/Ice/interceptor/AMDInterceptorI.cpp2
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.cpp2
-rw-r--r--csharp/test/Glacier2/sessionHelper/Client.cs9
-rw-r--r--java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java9
-rw-r--r--java/test/src/main/java/test/Glacier2/sessionHelper/Client.java9
6 files changed, 6 insertions, 34 deletions
diff --git a/cpp/test/Glacier2/sessionHelper/Client.cpp b/cpp/test/Glacier2/sessionHelper/Client.cpp
index a1a296e87be..be06c28da0d 100644
--- a/cpp/test/Glacier2/sessionHelper/Client.cpp
+++ b/cpp/test/Glacier2/sessionHelper/Client.cpp
@@ -394,14 +394,7 @@ public:
}
cout << "ok" << endl;
-// try
-// {
-// test(_session.session() != null);
-// }
-// catch(Glacier2.SessionNotExistException ex)
-// {
-// test(false);
-// }
+ test(!_session->session());
cout << "testing stringToProxy for server object... " << flush;
Ice::ObjectPrxPtr base =
diff --git a/cpp/test/Ice/interceptor/AMDInterceptorI.cpp b/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
index 343fa2e1f1d..cc32796b157 100644
--- a/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
+++ b/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
@@ -73,7 +73,7 @@ AMDInterceptorI::dispatch(Ice::Request& request)
{
rethrow_exception(ex);
}
- catch(Test::RetryException&)
+ catch(const Test::RetryException&)
{
}
catch(...)
diff --git a/cpp/test/Ice/interceptor/MyObjectI.cpp b/cpp/test/Ice/interceptor/MyObjectI.cpp
index bd31a132d5a..02ca9ca8a6f 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.cpp
+++ b/cpp/test/Ice/interceptor/MyObjectI.cpp
@@ -114,7 +114,7 @@ MyObjectI::amdAddWithRetryAsync(int x,
this_thread::sleep_for(chrono::milliseconds(10));
response(x + y);
}
- catch(Ice::ResponseSentException&)
+ catch(const Ice::ResponseSentException&)
{
}
});
diff --git a/csharp/test/Glacier2/sessionHelper/Client.cs b/csharp/test/Glacier2/sessionHelper/Client.cs
index 6b8d1ba0882..fe0986825d6 100644
--- a/csharp/test/Glacier2/sessionHelper/Client.cs
+++ b/csharp/test/Glacier2/sessionHelper/Client.cs
@@ -296,14 +296,7 @@ public class Client : TestCommon.Application
}
Console.Out.WriteLine("ok");
-// try
-// {
-// test(_session.session() != null);
-// }
-// catch(Glacier2.SessionNotExistException ex)
-// {
-// test(false);
-// }
+ test(_session.session() == null);
Console.Out.Write("testing stringToProxy for server object... ");
Console.Out.Flush();
diff --git a/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java b/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
index 33889888669..933197b4667 100644
--- a/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
+++ b/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
@@ -289,14 +289,7 @@ public class Client extends test.Util.Application
}
out.println("ok");
-// try
-// {
-// test(_session.session() != null);
-// }
-// catch(Glacier2.SessionNotExistException ex)
-// {
-// test(false);
-// }
+ test(_session.session() == null);
out.print("testing stringToProxy for server object... ");
out.flush();
diff --git a/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java b/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
index 2e1bbe197ef..33c9f41058d 100644
--- a/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
+++ b/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
@@ -270,14 +270,7 @@ public class Client extends test.Util.Application
}
out.println("ok");
-// try
-// {
-// test(_session.session() != null);
-// }
-// catch(com.zeroc.Glacier2.SessionNotExistException ex)
-// {
-// test(false);
-// }
+ test(_session.session() == null);
out.print("testing stringToProxy for server object... ");
out.flush();