diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-05-17 21:36:31 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-05-17 21:36:31 +0000 |
commit | 8ab0e64e8aea8398fcb85381e576b8c440ba6aa2 (patch) | |
tree | 2a97f61f8aade7b3b6e73b33ebfe31b87566a543 /cpp/src | |
parent | typo (diff) | |
download | ice-8ab0e64e8aea8398fcb85381e576b8c440ba6aa2.tar.bz2 ice-8ab0e64e8aea8398fcb85381e576b8c440ba6aa2.tar.xz ice-8ab0e64e8aea8398fcb85381e576b8c440ba6aa2.zip |
Split DispatchStatus into DispatchStatus and ReplyStatus
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 16 | ||||
-rw-r--r-- | cpp/src/slice2javae/Gen.cpp | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index de6073b63a9..d076c126124 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -1993,7 +1993,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) H << sp; H << nl - << "virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);"; + << "virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);"; string flatName = p->flattenedScope() + p->name() + "_all"; C << sp; @@ -2010,7 +2010,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) } C << eb << ';'; C << sp; - C << nl << "::IceInternal::DispatchStatus" << nl << scoped.substr(2) + C << nl << "::Ice::DispatchStatus" << nl << scoped.substr(2) << "::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)"; C << sb; @@ -2019,7 +2019,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) << ", current.operation);"; C << nl << "if(r.first == r.second)"; C << sb; - C << nl << "return ::IceInternal::DispatchOperationNotExist;"; + C << nl << "throw Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);"; C << eb; C << sp; C << nl << "switch(r.first - " << flatName << ')'; @@ -2035,7 +2035,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << eb; C << sp; C << nl << "assert(false);"; - C << nl << "return ::IceInternal::DispatchOperationNotExist;"; + C << nl << "throw Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);"; C << eb; } @@ -2156,11 +2156,11 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) H << nl << deprecateSymbol << "virtual " << retS << ' ' << fixKwd(name) << params << (isConst ? " const" : "") << " = 0;"; - H << nl << "::IceInternal::DispatchStatus ___" << name + H << nl << "::Ice::DispatchStatus ___" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << (isConst ? " const" : "") << ';'; C << sp; - C << nl << "::IceInternal::DispatchStatus" << nl << scope.substr(2) << "___" << name + C << nl << "::Ice::DispatchStatus" << nl << scope.substr(2) << "___" << name << "(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)" << (isConst ? " const" : ""); C << sb; @@ -2216,11 +2216,11 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) C << nl << "catch(const " << fixKwd((*r)->scoped()) << "& __ex)"; C << sb; C << nl << "__os->write(__ex);"; - C << nl << "return ::IceInternal::DispatchUserException;"; + C << nl << "return ::Ice::DispatchUserException;"; C << eb; } } - C << nl << "return ::IceInternal::DispatchOK;"; + C << nl << "return ::Ice::DispatchOK;"; C << eb; } diff --git a/cpp/src/slice2javae/Gen.cpp b/cpp/src/slice2javae/Gen.cpp index ff8dcfcd2a0..a00430a9107 100644 --- a/cpp/src/slice2javae/Gen.cpp +++ b/cpp/src/slice2javae/Gen.cpp @@ -435,7 +435,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) assert(cl); string opName = op->name(); - out << sp << nl << "public static IceInternal.DispatchStatus" << nl << "___" << opName << '(' << name + out << sp << nl << "public static Ice.DispatchStatus" << nl << "___" << opName << '(' << name << " __obj, IceInternal.Incoming __in, Ice.Current __current)"; out << sb; @@ -562,7 +562,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) { writeMarshalUnmarshalCode(out, package, ret, "__ret", true, iter, false, opMetaData); } - out << nl << "return IceInternal.DispatchStatus.DispatchOK;"; + out << nl << "return Ice.DispatchStatus.DispatchOK;"; // // Handle user exceptions. @@ -577,7 +577,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << nl << "catch(" << exS << " ex)"; out << sb; out << nl << "__os.writeUserException(ex);"; - out << nl << "return IceInternal.DispatchStatus.DispatchUserException;"; + out << nl << "return Ice.DispatchStatus.DispatchUserException;"; out << eb; } } @@ -612,13 +612,13 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) } out << eb << ';'; - out << sp << nl << "public IceInternal.DispatchStatus" << nl + out << sp << nl << "public Ice.DispatchStatus" << nl << "__dispatch(IceInternal.Incoming in, Ice.Current __current)"; out << sb; out << nl << "int pos = IceUtil.Arrays.search(__all, __current.operation);"; out << nl << "if(pos < 0)"; out << sb; - out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;"; + out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; out << eb; out << sp << nl << "switch(pos)"; out << sb; @@ -685,7 +685,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << sb; out << sp << nl << "IceUtil.Debug.Assert(false);"; out << eb; - out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;"; + out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; out << eb; } } |