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/slice2cpp/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/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 254aa82b888..6ebb4b44bf0 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -4140,20 +4140,10 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl << "if(!__ok)"; C << sb; - C << nl << "__is->throwException();"; - C << eb; - writeUnmarshalCode(C, outParams, ret); - if(p->returnsClasses()) - { - C << nl << "__is->readPendingObjects();"; - } - C << eb; - C << nl << "catch(const ::Ice::LocalException& __ex)"; + C << nl << "try"; C << sb; - C << nl << "__finished(__ex);"; - C << nl << "return;"; + C << nl << "__is->throwException();"; C << eb; - // // Generate a catch block for each legal user exception. // (See comment in DelegateMVisitor::visitOperation() for details.) @@ -4175,9 +4165,21 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) C << nl << "return;"; C << eb; } - C << nl << "catch(const ::Ice::UserException&)"; + C << nl << "catch(const ::Ice::UserException& __ex)"; C << sb; - C << nl << "ice_exception(::Ice::UnknownUserException(__FILE__, __LINE__));"; + C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());"; + C << eb; + C << eb; + + writeUnmarshalCode(C, outParams, ret); + if(p->returnsClasses()) + { + C << nl << "__is->readPendingObjects();"; + } + C << eb; + C << nl << "catch(const ::Ice::LocalException& __ex)"; + C << sb; + C << nl << "__finished(__ex);"; C << nl << "return;"; C << eb; C << nl << "ice_response" << spar << args << epar << ';'; |