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 | 8481cf3fd85c90e0bd465480b27509c273dee056 (patch) | |
tree | 57b3e0efe813f1f026bc2d64f6615ff87eebf5a6 /cpp/lib/common/sys/apr/LFSessionContext.cpp | |
parent | d1758038d6d52b30d588ffd4f2764ad54e9a5029 (diff) | |
download | qpid-python-8481cf3fd85c90e0bd465480b27509c273dee056.tar.gz |
Some basic additional error logging of framing errors.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@496665 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/common/sys/apr/LFSessionContext.cpp')
-rw-r--r-- | cpp/lib/common/sys/apr/LFSessionContext.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/lib/common/sys/apr/LFSessionContext.cpp b/cpp/lib/common/sys/apr/LFSessionContext.cpp index 7fb8d5a91b..f0804f6c72 100644 --- a/cpp/lib/common/sys/apr/LFSessionContext.cpp +++ b/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; |