diff options
author | Mark Spruiell <mes@zeroc.com> | 2005-07-25 19:19:26 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2005-07-25 19:19:26 +0000 |
commit | ce5453ccbc3bed8c06dddc60dd922d7eb82dd6b7 (patch) | |
tree | d460314d578685b68664bf951100f65efe752f90 /cpp/src/slice2java/Gen.cpp | |
parent | fix for bug 421 (diff) | |
download | ice-ce5453ccbc3bed8c06dddc60dd922d7eb82dd6b7.tar.bz2 ice-ce5453ccbc3bed8c06dddc60dd922d7eb82dd6b7.tar.xz ice-ce5453ccbc3bed8c06dddc60dd922d7eb82dd6b7.zip |
AMI change for UnknownUserException
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index adbcaa5607c..c45c07499be 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -4915,8 +4915,23 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) out << sb; out << nl << "if(!__ok)"; out << sb; + out << nl << "try"; + out << sb; out << nl << "__is.throwException();"; out << eb; + for(ExceptionList::const_iterator r = throws.begin(); r != throws.end(); ++r) + { + out << nl << "catch(" << getAbsolute(*r, classPkg) << " __ex)"; + out << sb; + out << nl << "ice_exception(__ex);"; + out << nl << "return;"; + 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) { TypePtr paramType = (*pli)->type(); @@ -4949,19 +4964,6 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) out << nl << "__is.readPendingObjects();"; } out << eb; - for(ExceptionList::const_iterator r = throws.begin(); r != throws.end(); ++r) - { - out << nl << "catch(" << getAbsolute(*r, classPkg) << " __ex)"; - out << sb; - out << nl << "ice_exception(__ex);"; - out << nl << "return;"; - out << eb; - } - out << nl << "catch(Ice.UserException __ex)"; - out << sb; - out << nl << "__finished(new Ice.UnknownUserException(__ex.ice_name()));"; - out << nl << "return;"; - out << eb; out << nl << "catch(Ice.LocalException __ex)"; out << sb; out << nl << "__finished(__ex);"; |