diff options
author | Gordon Sim <gsim@apache.org> | 2007-01-16 12:00:22 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-01-16 12:00:22 +0000 |
commit | 84644f36a168cd4558725c4977b39b9966b1289b (patch) | |
tree | 56bbe1f255b5efd39dacdbff1b3eca83804a7fda /qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp | |
parent | f5032290250d66a61925de1aebd29eac051f364e (diff) | |
download | qpid-python-84644f36a168cd4558725c4977b39b9966b1289b.tar.gz |
Some basic additional error logging of framing errors.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@496665 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp')
-rw-r--r-- | qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp b/qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp index 7fb8d5a91b..f0804f6c72 100644 --- a/qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp +++ b/qpid/cpp/lib/common/sys/apr/LFSessionContext.cpp @@ -58,9 +58,15 @@ void LFSessionContext::read(){ in.flip(); if(initiated){ AMQFrame frame; - while(frame.decode(in)){ - if(debug) log("RECV", &frame); - handler->received(&frame); + try{ + while(frame.decode(in)){ + if(debug) log("RECV", &frame); + handler->received(&frame); + } + }catch(QpidError error){ + std::cout << "Error [" << error.code << "] " << error.msg + << " (" << error.location.file << ":" << error.location.line + << ")" << std::endl; } }else{ ProtocolInitiation protocolInit; |