diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-06-20 11:09:54 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-06-20 11:09:54 -0230 |
commit | e2ca0b3550347f37113569571dede1aae48922b9 (patch) | |
tree | e8c85dd8c92d8d70b9bbddf3a5ce415522980fcf /cpp/src/slice2cpp/Gen.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-e2ca0b3550347f37113569571dede1aae48922b9.tar.bz2 ice-e2ca0b3550347f37113569571dede1aae48922b9.tar.xz ice-e2ca0b3550347f37113569571dede1aae48922b9.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2140
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index da5f91bbb8e..ec7b3e7d23e 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -5126,27 +5126,29 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) } else { - C << nl << "try"; - C << sb; - C << nl << "throw ex;"; - C << eb; ExceptionList::const_iterator r; for(r = throws.begin(); r != throws.end(); ++r) { - C << nl << "catch(const " << fixKwd((*r)->scoped()) << "& __ex)"; + C << nl; + if(r != throws.begin()) + { + C << "else "; + } + C << "if(const " << fixKwd((*r)->scoped()) << "* __ex = dynamic_cast<const " << fixKwd((*r)->scoped()) + << "*>(&ex))"; C << sb; C << nl <<"if(__validateResponse(false))"; C << sb; - C << nl << "__os()->write(__ex);"; + C << nl << "__os()->write(*__ex);"; C << nl << "__response(false);"; C << eb; C << eb; } - C << nl << "catch(const ::std::exception& __ex)"; + C << nl << "else"; C << sb; - C << nl << "if(__validateException(__ex))"; + C << nl << "if(__validateException(ex))"; C << sb; - C << nl << "__exception(__ex);"; + C << nl << "__exception(ex);"; C << eb; C << eb; } |