summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp16
-rw-r--r--cpp/src/slice2cppe/Gen.cpp8
-rw-r--r--cpp/src/slice2javae/Gen.cpp27
-rw-r--r--cpp/src/slice2javae/Gen.h6
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&);