summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp3
-rw-r--r--cpp/src/slice2java/Gen.cpp18
2 files changed, 15 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 1e9688b7f6f..4da25e138b0 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -3388,12 +3388,13 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
}
C << eb;
writeUnmarshalCode(C, outParams, ret);
- C << nl << "ice_response(" << args << ");";
C << eb;
C << nl << "catch(const ::Ice::Exception& __ex)";
C << sb;
C << nl << "ice_exception(__ex);";
+ C << nl << "return;";
C << eb;
+ C << nl << "ice_response(" << args << ");";
C << eb;
}
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index b3e6c47cc60..8f8fd12a662 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -3780,6 +3780,16 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
}
out << sp << nl << "protected final void __response(boolean __ok)";
out << sb;
+ for(q = outParams.begin(); q != outParams.end(); ++q)
+ {
+ string typeS = typeToString(q->first, TypeModeIn, classScope);
+ out << nl << typeS << ' ' << fixKwd(q->second) << ';';
+ }
+ if(ret)
+ {
+ string retS = typeToString(ret, TypeModeIn, classScope);
+ out << nl << retS << " __ret;";
+ }
out << nl << "try";
out << sb;
if(ret || !outParams.empty() || !throws.empty())
@@ -3840,29 +3850,27 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
out << eb;
for(q = outParams.begin(); q != outParams.end(); ++q)
{
- string typeS = typeToString(q->first, TypeModeIn, classScope);
- out << nl << typeS << ' ' << fixKwd(q->second) << ';';
writeMarshalUnmarshalCode(out, classScope, q->first, fixKwd(q->second), false, iter);
}
if(ret)
{
- string retS = typeToString(ret, TypeModeIn, classScope);
- out << nl << retS << " __ret;";
writeMarshalUnmarshalCode(out, classScope, ret, "__ret", false, iter);
}
- out << nl << "ice_response(" << argsAMI << ");";
out << eb;
out << nl << "catch(Ice.LocalException __ex)";
out << sb;
out << nl << "ice_exception(__ex);";
+ out << nl << "return;";
out << eb;
if(!throws.empty())
{
out << nl << "catch(Ice.UserException __ex)";
out << sb;
out << nl << "ice_exception(__ex);";
+ out << nl << "return;";
out << eb;
}
+ out << nl << "ice_response(" << argsAMI << ");";
out << eb;
out << eb << ';';