diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:29:39 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:29:39 +0000 |
commit | 8707a5575b33c8195e399abe54244e33b08b199e (patch) | |
tree | 9ad670f5c8240f25aefe05c9c04cefa89e07ff19 /cpp/src | |
parent | Ported retry test (diff) | |
download | ice-8707a5575b33c8195e399abe54244e33b08b199e.tar.bz2 ice-8707a5575b33c8195e399abe54244e33b08b199e.tar.xz ice-8707a5575b33c8195e399abe54244e33b08b199e.zip |
Ported fix for bug 574
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 16 | ||||
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2javae/Gen.cpp | 27 | ||||
-rw-r--r-- | cpp/src/slice2javae/Gen.h | 6 |
4 files changed, 15 insertions, 42 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ddd70a20380..3a0a22c080c 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1729,18 +1729,16 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) string thisPointer = fixKwd(scope.substr(0, scope.size() - 2)) + "*"; H << sp; - H << nl << retS << ' ' << fixKwd(name) << spar << params << epar << ';'; - H << nl << retS << ' ' << fixKwd(name) << spar << params << "const ::Ice::Context&" << epar << ';'; - - C << sp << nl << retS << nl << "IceProxy" << scoped << spar << paramsDecl << epar; - C << sb; - C << nl; + H << nl << retS << ' ' << fixKwd(name) << spar << paramsDecl << epar; + H << sb; + H << nl; if(ret) { - C << "return "; + H << "return "; } - C << fixKwd(name) << spar << args << "__defaultContext()" << epar << ';'; - C << eb; + H << fixKwd(name) << spar << args << "__defaultContext()" << epar << ';'; + H << eb; + H << nl << retS << ' ' << fixKwd(name) << spar << params << "const ::Ice::Context&" << epar << ';'; C << sp << nl << retS << nl << "IceProxy" << scoped << spar << paramsDecl << "const ::Ice::Context& __ctx" << epar; C << sb; diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index e7417ebf3b9..e332eb5d6b2 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -1505,7 +1505,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "catch(const ::Ice::LocalException& __ex)"; C << sb; - C << nl << "throw ::IceInternal::NonRepeatable(__ex);"; + C << nl << "throw ::IceInternal::LocalExceptionWrapper(__ex, false);"; C << eb; C.zeroIndent(); @@ -1523,15 +1523,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "return;"; } C << eb; - C << nl << "catch(const ::IceInternal::NonRepeatable& __ex)"; + C << nl << "catch(const ::IceInternal::LocalExceptionWrapper& __ex)"; C << sb; if(p->mode() == Operation::Idempotent || p->mode() == Operation::Nonmutating) { - C << nl << "__handleException(*__ex.get(), __cnt);"; + C << nl << "__handleExceptionWrapperRelaxed(__ex, __cnt);"; } else { - C << nl << "__rethrowException(*__ex.get());"; + C << nl << "__handleExceptionWrapper(__ex);"; } C << eb; C << nl << "catch(const ::Ice::LocalException& __ex)"; diff --git a/cpp/src/slice2javae/Gen.cpp b/cpp/src/slice2javae/Gen.cpp index d26f9913262..c6c7e4c2cca 100644 --- a/cpp/src/slice2javae/Gen.cpp +++ b/cpp/src/slice2javae/Gen.cpp @@ -151,25 +151,6 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList } void -Slice::JavaVisitor::writeDelegateThrowsClause(const string& package, const ExceptionList& throws) -{ - Output& out = output(); - out.inc(); - out << nl << "throws "; - out.useCurrentPosAsIndent(); - out << "IceInternal.NonRepeatable"; - - ExceptionList::const_iterator r; - for(r = throws.begin(); r != throws.end(); ++r) - { - out << "," << nl; - out << getAbsolute(*r, package); - } - out.restoreIndent(); - out.dec(); -} - -void Slice::JavaVisitor::writeHashCode(Output& out, const TypePtr& type, const string& name, int& iter) { BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); @@ -2275,7 +2256,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; out << nl << "catch(Ice.LocalException __ex)"; out << sb; - out << nl << "throw new IceInternal.NonRepeatable(__ex);"; + out << nl << "throw new IceInternal.LocalExceptionWrapper(__ex, false);"; out << eb; out << eb; out << nl << "finally"; @@ -2287,15 +2268,15 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "return ;"; } out << eb; - out << nl << "catch(IceInternal.NonRepeatable __ex)"; + out << nl << "catch(IceInternal.LocalExceptionWrapper __ex)"; out << sb; if(op->mode() == Operation::Idempotent || op->mode() == Operation::Nonmutating) { - out << nl << "__cnt = __handleException(__ex.get(), __cnt);"; + out << nl << "__cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);"; } else { - out << nl << "__rethrowException(__ex.get());"; + out << nl << "__handleExceptionWrapper(__ex);"; } out << eb; out << nl << "catch(Ice.LocalException __ex)"; diff --git a/cpp/src/slice2javae/Gen.h b/cpp/src/slice2javae/Gen.h index 38680486c53..470f0dfe203 100644 --- a/cpp/src/slice2javae/Gen.h +++ b/cpp/src/slice2javae/Gen.h @@ -57,12 +57,6 @@ protected: void writeThrowsClause(const std::string&, const ExceptionList&); // - // Generate a throws clause for delegate operations containing only - // non-local exceptions. - // - void writeDelegateThrowsClause(const std::string&, const ExceptionList&); - - // // Generate code to compute a hash code for a type. // void writeHashCode(::IceUtil::Output&, const TypePtr&, const std::string&, int&); |