summaryrefslogtreecommitdiff
path: root/cpp/src/slice2objc
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-08-30 14:12:13 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-08-30 14:12:13 +0200
commit95c5034278793e4a3f5dda9cec85b6f24b736756 (patch)
tree9cad293e2fe678f296ba94be0efa3c82e99118c0 /cpp/src/slice2objc
parentPorted interceptor and ICE-6980 changes to java-compat (diff)
downloadice-95c5034278793e4a3f5dda9cec85b6f24b736756.tar.bz2
ice-95c5034278793e4a3f5dda9cec85b6f24b736756.tar.xz
ice-95c5034278793e4a3f5dda9cec85b6f24b736756.zip
ICE-6980 - Removed server-side user exception checks in Objective-C
Diffstat (limited to 'cpp/src/slice2objc')
-rw-r--r--cpp/src/slice2objc/Gen.cpp44
1 files changed, 7 insertions, 37 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp
index 28c0b04cbe8..c5f6fa99959 100644
--- a/cpp/src/slice2objc/Gen.cpp
+++ b/cpp/src/slice2objc/Gen.cpp
@@ -201,7 +201,7 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
assert(cl);
string opName = getName(op);
- _M << sp << nl << "+(BOOL)" << op->name() << "___:(id<" << name << ">)target_ current:(ICECurrent *)current "
+ _M << sp << nl << "+(void)" << op->name() << "___:(id<" << name << ">)target_ current:(ICECurrent *)current "
<< "is:(id<ICEInputStream>)is_ os:(id<ICEOutputStream>)os_";
_M << sb;
@@ -232,10 +232,6 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
outParams.push_back(*pli);
}
}
- ExceptionList throws = op->throws();
- throws.sort();
- throws.unique();
- throws.sort(Slice::DerivedToBaseCompare());
for(ParamDeclList::const_iterator inp = inParams.begin(); inp != inParams.end(); ++inp)
{
@@ -254,11 +250,6 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
_M << nl << "[is_ readPendingValues];";
}
_M << nl << "[is_ endEncapsulation];";
- if(!throws.empty())
- {
- _M << nl << "@try";
- _M << sb;
- }
for(ParamDeclList::const_iterator outp = outParams.begin(); outp != outParams.end(); ++outp)
{
TypePtr type = (*outp)->type();
@@ -292,29 +283,7 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
{
_M << nl << "[os_ writePendingValues];";
}
- if(!throws.empty())
- {
- _M << eb;
- ExceptionList::const_iterator t;
- for(t = throws.begin(); t != throws.end(); ++t)
- {
- string exS = fixName(*t);
- _M << nl << "@catch(" << exS << " *ex)";
- _M << sb;
- _M << nl << "[os_ writeException:ex];";
- _M << nl << "return NO;";
- _M << eb;
- }
- _M << nl << "@finally";
- _M << sb;
- _M << nl << "[os_ endEncapsulation];";
- _M << eb;
- }
- else
- {
- _M << nl << "[os_ endEncapsulation];";
- }
- _M << nl << "return YES;";
+ _M << nl << "[os_ endEncapsulation];";
_M << eb;
}
@@ -347,7 +316,7 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
}
_M << eb << ';';
- _M << sp << nl << "-(BOOL) dispatch__:(ICECurrent *)current is:(id<ICEInputStream>)is "
+ _M << sp << nl << "-(void) dispatch__:(ICECurrent *)current is:(id<ICEInputStream>)is "
<< "os:(id<ICEOutputStream>)os";
_M << sb;
_M << nl << "id target__ = [self target__];";
@@ -361,13 +330,14 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
_M.inc();
if(q->second == "ICEObject")
{
- _M << nl << "return [ICEServant " << q->first << "___:(id<" << q->second << ">)self";
+ _M << nl << "[ICEServant " << q->first << "___:(id<" << q->second << ">)self";
}
else
{
- _M << nl << "return [" << q->second << " " << q->first << "___:(id<" << q->second << ">)target__";
+ _M << nl << "[" << q->second << " " << q->first << "___:(id<" << q->second << ">)target__";
}
_M << " current:current is:is os:os];";
+ _M << nl << "return;";
_M.dec();
}
_M << nl << "default:";
@@ -1085,7 +1055,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
for(r = ops.begin(); r != ops.end(); ++r)
{
OperationPtr op = *r;
- _H << nl << "+(BOOL)" << op->name() << "___:(id<" << name
+ _H << nl << "+(void)" << op->name() << "___:(id<" << name
<< ">)target current:(ICECurrent *)current "
<< "is:(id<ICEInputStream>)is_ os:(id<ICEOutputStream>)os_;";
}