
// Auto-generated file -- do not edit

#ifndef AUTOGEN_CONNECTIONEXCEPTION_H
#define AUTOGEN_CONNECTIONEXCEPTION_H

#include "BoxException.h"

// --------------------------------------------------------------------------
//
// Class
//		Name:    ConnectionException
//		Purpose: Exception
//		Created: autogen
//
// --------------------------------------------------------------------------
class ConnectionException : public BoxException
{
public:
	ConnectionException(unsigned int SubType,
		const std::string& rMessage = "")
	: mSubType(SubType), mMessage(rMessage)
	{
	}
	
	ConnectionException(const ConnectionException &rToCopy)
	: mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage)
	{
	}
	
	~ConnectionException() throw ()
	{
	}
	
	enum
	{
		ExceptionType = 7
	};

	enum
	{
		SocketWriteError = 6,
		SocketReadError = 7,
		SocketNameLookupError = 9,
		SocketShutdownError = 12,
		SocketConnectError = 15,
		TLSHandshakeFailed = 30,
		TLSShutdownFailed = 32,
		TLSWriteFailed = 33,
		TLSReadFailed = 34,
		TLSNoPeerCertificate = 36,
		TLSPeerCertificateInvalid = 37,
		TLSClosedWhenWriting = 38,
		TLSHandshakeTimedOut = 39,
		Protocol_Timeout = 41,
		Protocol_ObjTooBig = 42,
		Protocol_BadCommandRecieved = 44,
		Protocol_UnknownCommandRecieved = 45,
		Protocol_TriedToExecuteReplyCommand = 46,
		Protocol_UnexpectedReply = 47,
		Protocol_HandshakeFailed = 48,
		Protocol_StreamWhenObjExpected = 49,
		Protocol_ObjWhenStreamExpected = 50,
		Protocol_TimeOutWhenSendingStream = 52
	};
	
	virtual unsigned int GetType() const throw();
	virtual unsigned int GetSubType() const throw();
	virtual const char *what() const throw();
	virtual const std::string& GetMessage() const
	{
		return mMessage;
	}

private:
	unsigned int mSubType;
	std::string mMessage;
};

#endif // AUTOGEN_CONNECTIONEXCEPTION_H
