summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java')
-rw-r--r--cpp/src/slice2java/Gen.cpp18
1 files changed, 13 insertions, 5 deletions
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 << ';';