summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index a3785f4ed89..f33a3e97844 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -684,14 +684,34 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
C << sp;
C << nl << retS << nl << "IceProxy" << scoped << paramsDecl;
C << sb;
+ C << nl << "int __cnt = 0;";
+ C << nl << "while (true)";
+ C << sb;
C << nl << "::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();";
C << nl << "::IceDelegate" << scope << "* __del = dynamic_cast< ::IceDelegate" << scope << "*>(__delBase.get());";
+ C << nl << "try";
+ C << sb;
C << nl;
if (ret)
{
C << "return ";
}
C << "__del->" << name << args << ";";
+ if (!ret)
+ {
+ C << nl << "return;";
+ }
+ C << eb;
+ C << nl << "catch (const ::IceInternal::NonRepeatable& __ex)";
+ C << sb;
+// C << nl << "__handleException(*__ex.get(), __cnt);";
+ C << nl << "__ex.raise();";
+ C << eb;
+ C << nl << "catch (const ::Ice::LocalException& __ex)";
+ C << sb;
+ C << nl << "__handleException(__ex, __cnt);";
+ C << eb;
+ C << eb;
C << eb;
}