From df5748e5aabea42c8ab04f770d368d886be1fff3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 2 Feb 2012 22:16:24 +0000 Subject: Store more details in protocol exceptions to help with debugging. --- lib/server/makeprotocol.pl.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/server') 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) } } -- cgit v1.2.3