summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-09-05 19:17:27 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-09-05 19:17:27 +0200
commite58be6a8051d9800230d8443655b975d762a2b5c (patch)
treea3d524b2259f48beac74228647265c835691cb1f /cpp/src
parentIceGrid Admin Cmd+Q support on macOS (diff)
downloadice-e58be6a8051d9800230d8443655b975d762a2b5c.tar.bz2
ice-e58be6a8051d9800230d8443655b975d762a2b5c.tar.xz
ice-e58be6a8051d9800230d8443655b975d762a2b5c.zip
Fixed ICE-7311 - handling of Java errors with AMD
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2java/Gen.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index e0e4df2aba7..35c8b12aa42 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1525,7 +1525,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
// Call on the servant.
//
string classNameAMD = "AMD_" + p->name();
- out << nl << classNameAMD << '_' << opName << " __cb = new _" << classNameAMD << '_' << opName
+ out << nl << '_' << classNameAMD << '_' << opName << " __cb = new _" << classNameAMD << '_' << opName
<< "(__inS);";
out << nl << "try";
out << sb;
@@ -1550,6 +1550,10 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
out << sb;
out << nl << "__cb.ice_exception(ex);";
out << eb;
+ out << nl << "catch(java.lang.Error ex)";
+ out << sb;
+ out << nl << "__cb.__error(ex);";
+ out << eb;
out << nl << "return Ice.DispatchStatus.DispatchAsync;";
out << eb;