diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-02-02 22:16:24 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-02-02 22:16:24 +0000 |
commit | df5748e5aabea42c8ab04f770d368d886be1fff3 (patch) | |
tree | 6f26084215b2b69570d9609433a74707b3061529 /lib/server | |
parent | c7ce2e6d5e300296680ff7367b9bac975ae8c17e (diff) |
Store more details in protocol exceptions to help with debugging.
Diffstat (limited to 'lib/server')
-rwxr-xr-x | lib/server/makeprotocol.pl.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in index db33bd29..95dd84fd 100755 --- a/lib/server/makeprotocol.pl.in +++ b/lib/server/makeprotocol.pl.in @@ -583,20 +583,21 @@ void $protocol_base_class\::CheckReply(const std::string& requestCommand, if(rReply.IsError(type, subType)) { SetLastError(type, subType); - BOX_WARNING(requestCommand << " command failed: " + THROW_EXCEPTION_MESSAGE(ConnectionException, + Conn_Protocol_UnexpectedReply, + requestCommand << " command failed: " "received error " << (($error_class&)rReply).GetMessage()); } else { SetLastError(Protocol::UnknownError, Protocol::UnknownError); - BOX_WARNING(requestCommand << " command failed: " + THROW_EXCEPTION_MESSAGE(ConnectionException, + Conn_Protocol_UnexpectedReply, + requestCommand << " command failed: " "received unexpected response type " << rReply.GetType()); } - - // Throw an exception - THROW_EXCEPTION(ConnectionException, Conn_Protocol_UnexpectedReply) } } |