summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/callback/CallbackI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/callback/CallbackI.cpp')
-rw-r--r--cpp/demo/Ice/callback/CallbackI.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/demo/Ice/callback/CallbackI.cpp b/cpp/demo/Ice/callback/CallbackI.cpp
index 1e2fac27351..e8cd9053ab8 100644
--- a/cpp/demo/Ice/callback/CallbackI.cpp
+++ b/cpp/demo/Ice/callback/CallbackI.cpp
@@ -23,12 +23,26 @@ void
CallbackI::initiateCallback(const CallbackReceiverPrx& proxy, const Current& current)
{
cout << "initiating callback" << endl;
- proxy->callback(current.ctx);
+ try
+ {
+ proxy->callback(current.ctx);
+ }
+ catch(const Exception& ex)
+ {
+ cout << ex << endl;
+ }
}
void
CallbackI::shutdown(const Ice::Current& c)
{
cout << "Shutting down..." << endl;
- c.adapter->getCommunicator()->shutdown();
+ try
+ {
+ c.adapter->getCommunicator()->shutdown();
+ }
+ catch(const Exception& ex)
+ {
+ cout << ex << endl;
+ }
}