summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/CollocatedRequestHandler.cpp18
-rw-r--r--cpp/src/Ice/CollocatedRequestHandler.h1
-rw-r--r--cpp/src/Ice/ConnectionI.cpp6
-rw-r--r--cpp/src/Ice/ConnectionI.h1
-rw-r--r--cpp/src/Ice/Incoming.cpp9
-rw-r--r--cpp/src/Ice/ResponseHandler.h1
6 files changed, 20 insertions, 16 deletions
diff --git a/cpp/src/Ice/CollocatedRequestHandler.cpp b/cpp/src/Ice/CollocatedRequestHandler.cpp
index eb80eb5eeb7..fde2cbcb0b1 100644
--- a/cpp/src/Ice/CollocatedRequestHandler.cpp
+++ b/cpp/src/Ice/CollocatedRequestHandler.cpp
@@ -540,6 +540,14 @@ CollocatedRequestHandler::sendNoResponse()
_adapter->decDirectCount();
}
+bool
+CollocatedRequestHandler::systemException(Int requestId, const SystemException& ex)
+{
+ handleException(requestId, ex);
+ _adapter->decDirectCount();
+ return true;
+}
+
void
CollocatedRequestHandler::invokeException(Int requestId, const LocalException& ex, int invokeNum)
{
@@ -633,15 +641,7 @@ CollocatedRequestHandler::invokeAll(BasicStream* os, Int requestId, Int invokeNu
}
Incoming in(_reference->getInstance().get(), this, 0, _adapter, _response, 0, requestId);
- try
- {
- in.invoke(servantManager, os);
- }
- catch(const SystemException& ex)
- {
- handleException(requestId, ex);
- _adapter->decDirectCount();
- }
+ in.invoke(servantManager, os);
--invokeNum;
}
}
diff --git a/cpp/src/Ice/CollocatedRequestHandler.h b/cpp/src/Ice/CollocatedRequestHandler.h
index 7cba2acd5c1..3e106a1f280 100644
--- a/cpp/src/Ice/CollocatedRequestHandler.h
+++ b/cpp/src/Ice/CollocatedRequestHandler.h
@@ -56,6 +56,7 @@ public:
virtual void sendResponse(Ice::Int, BasicStream*, Ice::Byte);
virtual void sendNoResponse();
+ virtual bool systemException(Ice::Int, const Ice::SystemException&);
virtual void invokeException(Ice::Int, const Ice::LocalException&, int);
const ReferencePtr& getReference() const { return _reference; } // Inlined for performances.
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 1cae69bc9eb..d9588b62e89 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -1394,6 +1394,12 @@ Ice::ConnectionI::sendNoResponse()
}
}
+bool
+Ice::ConnectionI::systemException(Int, const SystemException&)
+{
+ return false; // System exceptions aren't marshalled.
+}
+
EndpointIPtr
Ice::ConnectionI::endpoint() const
{
diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h
index 3e190ca1008..36200d0aa4d 100644
--- a/cpp/src/Ice/ConnectionI.h
+++ b/cpp/src/Ice/ConnectionI.h
@@ -195,6 +195,7 @@ public:
virtual void sendResponse(Int, IceInternal::BasicStream*, Byte);
virtual void sendNoResponse();
+ virtual bool systemException(Int, const SystemException&);
IceInternal::EndpointIPtr endpoint() const;
IceInternal::ConnectorPtr connector() const;
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 5288c393e4a..7a6f216b041 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -260,14 +260,9 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
if(const SystemException* ex = dynamic_cast<const SystemException*>(&exc))
{
- //
- // Only rethrow the system exception if it's a collocated
- // call. For now, on-the-wire system exceptions aren't
- // supported.
- //
- if(!_current.con)
+ if(_responseHandler->systemException(_current.requestId, *ex))
{
- ex->ice_throw();
+ return;
}
}
diff --git a/cpp/src/Ice/ResponseHandler.h b/cpp/src/Ice/ResponseHandler.h
index ad803fbbb44..9d9c212bec8 100644
--- a/cpp/src/Ice/ResponseHandler.h
+++ b/cpp/src/Ice/ResponseHandler.h
@@ -30,6 +30,7 @@ public:
virtual void sendResponse(Ice::Int, BasicStream*, Ice::Byte) = 0;
virtual void sendNoResponse() = 0;
+ virtual bool systemException(Ice::Int, const Ice::SystemException&) = 0;
virtual void invokeException(Ice::Int, const Ice::LocalException&, int) = 0;
};