
// Auto-generated file -- do not edit

#include "Box.h"
#include "autogen_ConnectionException.h"

#include "MemLeakFindOn.h"

#ifdef EXCEPTION_CODENAMES_EXTENDED
	#ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
static const char *whats[] = {
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"Connection SocketWriteError (Probably a network issue between client and server.)",
	"Connection SocketReadError (Probably a network issue between client and server.)",
	"UNUSED",
	"Connection SocketNameLookupError (Check hostname specified.)",
	"UNUSED",
	"UNUSED",
	"Connection SocketShutdownError",
	"UNUSED",
	"UNUSED",
	"Connection SocketConnectError (Probably a network issue between client and server, bad hostname, or server not running.)",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"Connection TLSHandshakeFailed",
	"UNUSED",
	"Connection TLSShutdownFailed",
	"Connection TLSWriteFailed (Probably a network issue between client and server.)",
	"Connection TLSReadFailed (Probably a network issue between client and server, or a problem with the server.)",
	"UNUSED",
	"Connection TLSNoPeerCertificate",
	"Connection TLSPeerCertificateInvalid (Check certification process)",
	"Connection TLSClosedWhenWriting",
	"Connection TLSHandshakeTimedOut",
	"UNUSED",
	"Connection Protocol_Timeout (Probably a network issue between client and server.)",
	"Connection Protocol_ObjTooBig",
	"UNUSED",
	"Connection Protocol_BadCommandRecieved",
	"Connection Protocol_UnknownCommandRecieved",
	"Connection Protocol_TriedToExecuteReplyCommand",
	"Connection Protocol_UnexpectedReply (Server probably reported an error.)",
	"Connection Protocol_HandshakeFailed",
	"Connection Protocol_StreamWhenObjExpected",
	"Connection Protocol_ObjWhenStreamExpected",
	"UNUSED",
	"Connection Protocol_TimeOutWhenSendingStream (Probably a network issue between client and server.)"
};
	#else
static const char *whats[] = {
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"Connection SocketWriteError",
	"Connection SocketReadError",
	"UNUSED",
	"Connection SocketNameLookupError",
	"UNUSED",
	"UNUSED",
	"Connection SocketShutdownError",
	"UNUSED",
	"UNUSED",
	"Connection SocketConnectError",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"UNUSED",
	"Connection TLSHandshakeFailed",
	"UNUSED",
	"Connection TLSShutdownFailed",
	"Connection TLSWriteFailed",
	"Connection TLSReadFailed",
	"UNUSED",
	"Connection TLSNoPeerCertificate",
	"Connection TLSPeerCertificateInvalid",
	"Connection TLSClosedWhenWriting",
	"Connection TLSHandshakeTimedOut",
	"UNUSED",
	"Connection Protocol_Timeout",
	"Connection Protocol_ObjTooBig",
	"UNUSED",
	"Connection Protocol_BadCommandRecieved",
	"Connection Protocol_UnknownCommandRecieved",
	"Connection Protocol_TriedToExecuteReplyCommand",
	"Connection Protocol_UnexpectedReply",
	"Connection Protocol_HandshakeFailed",
	"Connection Protocol_StreamWhenObjExpected",
	"Connection Protocol_ObjWhenStreamExpected",
	"UNUSED",
	"Connection Protocol_TimeOutWhenSendingStream"
};
	#endif
#endif

unsigned int ConnectionException::GetType() const throw()
{
	return ConnectionException::ExceptionType;
}

unsigned int ConnectionException::GetSubType() const throw()
{
	return mSubType;
}

const char *ConnectionException::what() const throw()
{
#ifdef EXCEPTION_CODENAMES_EXTENDED
	if(mSubType < 0 || mSubType > (sizeof(whats) / sizeof(whats[0])))
	{
		return "Connection";
	}
	return whats[mSubType];
#else
	return "Connection";
#endif
}

