From 3d6af2bc56a33b482a938dc3e71ebfb87d2095a7 Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Sat, 25 Jan 2003 02:58:50 +0000 Subject: raise NonRepeatable when exception occurs during reply unmarshalling --- cpp/src/slice2cpp/Gen.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cpp/src/slice2cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 091264cd4fa..5c6a86c7b44 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1706,7 +1706,17 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) } C << eb; writeAllocateCode(C, TypeStringList(), ret); - writeUnmarshalCode(C, outParams, ret); + if(!outParams.empty() || ret) + { + C << nl << "try"; + C << sb; + writeUnmarshalCode(C, outParams, ret); + C << eb; + C << nl << "catch(const ::Ice::LocalException& __ex)"; + C << sb; + C << nl << "throw ::IceInternal::NonRepeatable(__ex);"; + C << eb; + } if(ret) { C << nl << "return __ret;"; -- cgit v1.2.3