diff options
author | Mark Spruiell <mes@zeroc.com> | 2005-07-25 16:26:46 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2005-07-25 16:26:46 +0000 |
commit | e30644c12cff30ad87a37da5cf2ce3f6a9b67461 (patch) | |
tree | 4f6b59510a0bf73cb2480cd08a62bd70a3b0064e /cpp/src/slice2java/Gen.cpp | |
parent | fix for bug 421 (diff) | |
download | ice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.tar.bz2 ice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.tar.xz ice-e30644c12cff30ad87a37da5cf2ce3f6a9b67461.zip |
another fix for UnknownUserException
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index e3a1a273f23..adbcaa5607c 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -4147,8 +4147,22 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "IceInternal.BasicStream __is = __og.is();"; out << nl << "if(!__ok)"; out << sb; + out << nl << "try"; + out << sb; out << nl << "__is.throwException();"; out << eb; + for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) + { + out << nl << "catch(" << getAbsolute(*t, package) << " __ex)"; + out << sb; + out << nl << "throw __ex;"; + out << eb; + } + out << nl << "catch(Ice.UserException __ex)"; + out << sb; + out << nl << "throw new Ice.UnknownUserException(__ex.ice_name());"; + out << eb; + out << eb; for(pli = outParams.begin(); pli != outParams.end(); ++pli) { writeMarshalUnmarshalCode(out, package, (*pli)->type(), fixKwd((*pli)->name()), false, iter, true, @@ -4185,17 +4199,6 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) } } out << eb; - for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) - { - out << nl << "catch(" << getAbsolute(*t, package) << " __ex)"; - out << sb; - out << nl << "throw __ex;"; - out << eb; - } - out << nl << "catch(Ice.UserException __ex)"; - out << sb; - out << nl << "throw new Ice.UnknownUserException(__ex.ice_name());"; - out << eb; out << nl << "catch(Ice.LocalException __ex)"; out << sb; out << nl << "throw new IceInternal.NonRepeatable(__ex);"; |