summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 666e23f1104..c9f7f42e243 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -4524,8 +4524,10 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(op->returnsData())
{
out << nl << "Ice.AsyncResult.__check(__result, this, __" << op->name() << "_name);";
- out << nl;
- out << "if(!__result.__wait())";
+ out << nl << "boolean __ok = __result.__wait();";
+ out << nl << "try";
+ out << sb;
+ out << nl << "if(!__ok)";
out << sb;
out << nl << "try";
out << sb;
@@ -4587,6 +4589,17 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return __ret;";
}
}
+
+ out << eb;
+ out << nl << "catch(Ice.LocalException ex)";
+ out << sb;
+ out << nl << "Ice.Instrumentation.InvocationObserver __obsv = __result.__getObserver();";
+ out << nl << "if(__obsv != null)";
+ out << sb;
+ out << nl << "__obsv.failed(ex.ice_name());";
+ out << eb;
+ out << nl << "throw ex;";
+ out << eb;
}
else
{