X-Plane Remote Access Plugin and Client Library
Public Types | Public Member Functions | Private Attributes | List of all members
hu::varadiistvan::xplra::ProtocolException Class Reference

#include <Exception.h>

Inheritance diagram for hu::varadiistvan::xplra::ProtocolException:
hu::varadiistvan::xplra::Exception

Public Types

enum  errorCode_t {
  INVALID_COMMAND = 1 , UNKNOWN_DATAREF = 2 , INVALID_TYPE = 3 , INVALID_LENGTH = 4 ,
  INVALID_OFFSET = 5 , INVALID_COUNT = 6 , INVALID_ID = 7 , INVALID_DURATION = 8 ,
  OTHER = 255
}
 

Public Member Functions

 ProtocolException (errorCode_t errorCode, bool hasParameter=false, long parameter=0) throw ()
 
errorCode_t getErrorCode () const throw ()
 
bool getParameter (long &param) const throw ()
 
- Public Member Functions inherited from hu::varadiistvan::xplra::Exception
 Exception (const char *message) throw ()
 
virtual ~Exception () throw ()
 
virtual const char * what () const throw ()
 

Private Attributes

errorCode_t errorCode
 
bool hasParameter
 
long parameter
 

Additional Inherited Members

- Protected Member Functions inherited from hu::varadiistvan::xplra::Exception
 Exception () throw ()
 
- Protected Attributes inherited from hu::varadiistvan::xplra::Exception
std::string message
 

Detailed Description

An exception arising from the invalid use of the protocol, e.g. an invalid dataref.

Definition at line 117 of file Exception.h.

Member Enumeration Documentation

◆ errorCode_t

Type for the error codes.

Enumerator
INVALID_COMMAND 

Invalid command issued.

UNKNOWN_DATAREF 

Unknown dataref.

INVALID_TYPE 

Invalid type.

INVALID_LENGTH 

Invalid length.

INVALID_OFFSET 

Invalid offset.

INVALID_COUNT 

Invalid count.

INVALID_ID 

Invalid ID.

INVALID_DURATION 

Invalid duration.

OTHER 

Other error.

Definition at line 123 of file Exception.h.

Constructor & Destructor Documentation

◆ ProtocolException()

ProtocolException::ProtocolException ( errorCode_t  errorCode,
bool  hasParameter = false,
long  parameter = 0 
)
throw (
)

Construct the exception.

Definition at line 63 of file Exception.cc.

Member Function Documentation

◆ getErrorCode()

ProtocolException::errorCode_t hu::varadiistvan::xplra::ProtocolException::getErrorCode ( ) const
throw (
)
inline

Get the error code.

Definition at line 264 of file Exception.h.

◆ getParameter()

bool hu::varadiistvan::xplra::ProtocolException::getParameter ( long &  param) const
throw (
)
inline

Get the value of the parameter and whether it is valid or not.

Definition at line 271 of file Exception.h.

Member Data Documentation

◆ errorCode

errorCode_t hu::varadiistvan::xplra::ProtocolException::errorCode
private

The error code.

Definition at line 156 of file Exception.h.

◆ hasParameter

bool hu::varadiistvan::xplra::ProtocolException::hasParameter
private

Indicate if the parameter is valid.

Definition at line 161 of file Exception.h.

◆ parameter

long hu::varadiistvan::xplra::ProtocolException::parameter
private

Parameter of the error.

Definition at line 166 of file Exception.h.


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