summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-07-25 16:26:46 +0000
committerMark Spruiell <mes@zeroc.com>2005-07-25 16:26:46 +0000
commite30644c12cff30ad87a37da5cf2ce3f6a9b67461 (patch)
tree4f6b59510a0bf73cb2480cd08a62bd70a3b0064e /cpp/src/slice2cpp/Gen.cpp
parentfix for bug 421 (diff)
downloadice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.tar.bz2
ice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.tar.xz
ice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.zip
another fix for UnknownUserException
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 2c0fa1933b9..254aa82b888 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1907,19 +1907,10 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p)
C << nl << "::IceInternal::BasicStream* __is = __og.is();";
C << nl << "if(!__ok)";
C << sb;
+ C << nl << "try";
+ C << sb;
C << nl << "__is->throwException();";
C << eb;
- writeAllocateCode(C, TypeStringList(), ret);
- writeUnmarshalCode(C, outParams, ret);
- if(p->returnsClasses())
- {
- C << nl << "__is->readPendingObjects();";
- }
- if(ret)
- {
- C << nl << "return __ret;";
- }
- C << eb;
//
// Generate a catch block for each legal user exception. This is necessary
@@ -1964,6 +1955,19 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p)
C << sb;
C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());";
C << eb;
+ C << eb;
+
+ writeAllocateCode(C, TypeStringList(), ret);
+ writeUnmarshalCode(C, outParams, ret);
+ if(p->returnsClasses())
+ {
+ C << nl << "__is->readPendingObjects();";
+ }
+ if(ret)
+ {
+ C << nl << "return __ret;";
+ }
+ C << eb;
C << nl << "catch(const ::Ice::LocalException& __ex)";
C << sb;
C << nl << "throw ::IceInternal::NonRepeatable(__ex);";