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/slice2java/Gen.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpp/src/slice2java/Gen.cpp') diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 13938c10b9a..3b0de1f5437 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -3109,6 +3109,11 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) } out << nl << "throw new Ice.UnknownUserException();"; out << eb; + if(!outParams.empty() || ret) + { + out << nl << "try"; + out << sb; + } for(q = outParams.begin(); q != outParams.end(); ++q) { writeMarshalUnmarshalCode(out, scope, q->first, fixKwd(q->second), false, iter, true); @@ -3119,6 +3124,14 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) writeMarshalUnmarshalCode(out, scope, ret, "__ret", false, iter); out << nl << "return __ret;"; } + if(!outParams.empty() || ret) + { + out << eb; + out << nl << "catch(Ice.LocalException __ex)"; + out << sb; + out << nl << "throw new IceInternal.NonRepeatable(__ex);"; + out << eb; + } out << eb; out << nl << "finally"; out << sb; -- cgit v1.2.3