From f2a96aec943298f8ad61bd0d1d7f19717271c85c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 16 Jun 2009 17:45:35 +0000 Subject: [PATCH] make sure and remove any UDP message remnants if there is an exception in a UDP message handler stub --- src/cas/generic/casDGClient.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index e18af2771..0604c46e2 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -838,26 +838,19 @@ caStatus casDGClient::processMsg () this->in.removeMsg ( msgSize ); } } - catch ( std::bad_alloc & ) { - status = this->sendErr ( - this->ctx.getMsg(), invalidResID, ECA_ALLOCMEM, - "inablility to allocate memory in " - "the server disconnected client" ); - status = S_cas_noMemory; - } catch ( std::exception & except ) { + this->in.removeMsg ( this->in.bytesPresent() ); status = this->sendErr ( this->ctx.getMsg(), invalidResID, ECA_INTERNAL, - "C++ exception \"%s\" in server " - "diconnected client", + "C++ exception \"%s\" in CA circuit server", except.what () ); status = S_cas_internal; } catch (...) { + this->in.removeMsg ( this->in.bytesPresent() ); status = this->sendErr ( this->ctx.getMsg(), invalidResID, ECA_INTERNAL, - "unexpected C++ exception in server " - "diconnected client" ); + "unexpected C++ exception in CA datagram server" ); status = S_cas_internal; }