GNE  0.75.0
GNE::PacketTypeMismatch Class Reference

An error thrown by SyncConnection when you get a packet other than the one you are trying to receive. More...

#include <Errors.h>

Inheritance diagram for GNE::PacketTypeMismatch:
GNE::Error

Public Member Functions

 PacketTypeMismatch (int OtherID)
int getWrongID () const
 Returns the offending packet's ID.
- Public Member Functions inherited from GNE::Error
 Error (ErrorCode ec=NoError)
 Create a new object representing a certain error, given by the passed ErrorCode.
ErrorCode getCode () const
 Returns the error code for this error.
const void setCode (ErrorCode newCode)
 Sets the error code for this error, useful after a call to createLowLevelError() to specify a more appropriate high-level error code.
virtual std::string toString () const
 Returns a string description of this error.
 operator bool () const
 Returns getCode() != NoError, a handy shortcut so you can test for error by if (error).
bool operator== (const ErrorCode &rhs) const
 A handy shortcut for (error.getCode() == rhs).

Additional Inherited Members

- Public Types inherited from GNE::Error
enum  ErrorCode {
  NoError = 0, ProtocolViolation, GNETheirVersionLow, GNETheirVersionHigh,
  WrongGame, UserVersionMismatch, CouldNotOpenSocket, ConnectionTimeOut,
  ConnectionAborted, ConnectionRefused, ConnectionDropped, SyncConnectionReleased,
  ExitNoticeReceived, Read, Write, UnknownPacket,
  PacketTypeMismatch, DuplicateObjectId, UnknownObjectId, InvalidObjectPacket,
  InvalidCreationPacketType, BufferUnderflow, BufferOverflow, InvalidBufferPosition,
  InvalidBufferLimit, OtherGNELevelError, OtherLowLevelError, User
}
 An enum describing connection failure type. More...

Detailed Description

An error thrown by SyncConnection when you get a packet other than the one you are trying to receive.


The documentation for this class was generated from the following file: