[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Oct 19 20:55:04 CDT 2010
branch "master" has been updated
via 565dd18cda4c686d41172bd494c7ed41b63a9370 (commit)
from f6554bb1e61e36e59330b360f6ebe474a8dd6504 (commit)
Summary of changes:
src/BridgeImpl.cpp | 68 +++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 51 insertions(+), 17 deletions(-)
- Log -----------------------------------------------------------------
commit 565dd18cda4c686d41172bd494c7ed41b63a9370
Author: Brent Eagles <beagles at digium.com>
Date: Tue Oct 19 23:23:48 2010 -0230
Add some additional exception handling/logging.
diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 79cfc97..c51b0b1 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -81,16 +81,18 @@ namespace BridgeService
{
try
{
- b->getSession()->removeBridge(mListener);
b->getSession()->stop(mResponse);
+ b->getSession()->removeBridge(mListener);
b->disconnect();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
mNonExistent.push_back(b);
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
@@ -118,12 +120,14 @@ namespace BridgeService
{
b->getSession()->progress(mResponse);
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
@@ -153,12 +157,14 @@ namespace BridgeService
{
b->getSession()->ring();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
}
@@ -182,12 +188,14 @@ namespace BridgeService
{
b->getSession()->flash();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
@@ -208,12 +216,14 @@ namespace BridgeService
{
b->getSession()->hold();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
@@ -234,12 +244,14 @@ namespace BridgeService
{
b->getSession()->unhold();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
@@ -267,12 +279,14 @@ namespace BridgeService
{
b->connect();
}
- catch(const Ice::ObjectNotExistException&)
+ catch(const Ice::ObjectNotExistException& ex)
{
mNonExistent.push_back(b);
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
- catch(const Ice::Exception&)
+ catch(const Ice::Exception& ex)
{
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
}
}
}
@@ -319,7 +333,15 @@ namespace BridgeService
void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const Ice::Current&)
{
- mBridge->sessionConnected(source);
+ try
+ {
+ mBridge->sessionConnected(source);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
+ throw;
+ }
std::vector<BridgeImpl::BridgeSessionPtr> sessions(mBridge->currentSessions());
std::for_each(sessions.begin(), sessions.end(), ConnectImpl(source));
}
@@ -739,7 +761,19 @@ size_t AsteriskSCF::BridgeService::BridgeImpl::sessionStopped(const AsteriskSCF:
const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response)
{
lg(Debug) << __FUNCTION__ << ": session terminated from " << session->ice_toString() ;
- session->removeBridge(mSessionListenerPrx);
+ try
+ {
+ session->removeBridge(mSessionListenerPrx);
+ }
+ catch(Ice::ObjectNotExistException& ex)
+ {
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
+ }
+ catch(Ice::Exception& ex)
+ {
+ lg(Debug) << __FUNCTION__ << ":" << __LINE__ << ex.what();
+ throw;
+ }
BridgeSessionPtr b;
size_t sizeAfter;
-----------------------------------------------------------------------
--
asterisk-scf/integration/bridging.git
More information about the asterisk-scf-commits
mailing list