Proud::ErrorInfo Class Reference

Public Member Functions

PROUD_API String ToString () const
 
PROUD_API ErrorInfoClone ()
 

Static Public Member Functions

static ErrorInfoPtr FromSocketError (ErrorType code, SocketErrorCode se)
 
static PROUD_API ErrorInfoPtr From (ErrorType errorType, HostID remote=HostID_None, const String &comment=String(), const ByteArray &lastReceivedMessage=ByteArray())
 
static PROUD_API const PNTCHAR * TypeToString (ErrorType e)
 
static PROUD_API const PNTCHAR * TypeToStringByLangID (ErrorType e, int languageID)
 
static PROUD_API const PNTCHAR * TypeToPlainString (ErrorType e)
 
static PROUD_API const PNTCHAR * TypeToString_Kor (ErrorType e)
 
static PROUD_API const PNTCHAR * TypeToString_Eng (ErrorType e)
 
static PROUD_API const PNTCHAR * TypeToString_Chn (ErrorType e)
 
static PROUD_API const PNTCHAR * TypeToString_Jpn (ErrorType e)
 

Public Attributes

ErrorType m_errorType
 
ErrorType m_detailType
 
SocketErrorCode m_socketError
 
HostID m_remote
 
String m_comment
 
AddrPort m_remoteAddr
 
ByteArray m_lastReceivedMessage
 
HRESULT m_hResult
 
String m_source
 

Detailed Description

Object contains error(or success) info

Member Function Documentation

PROUD_API ErrorInfo* Proud::ErrorInfo::Clone ( )

TODO:translate needed. The object itself is copied in a new object.

static PROUD_API ErrorInfoPtr Proud::ErrorInfo::From ( ErrorType  errorType,
HostID  remote = HostID_None,
const String comment = String(),
const ByteArray lastReceivedMessage = ByteArray() 
)
static

TODO:translate needed. Through ErrorInfo::From(), you can make ErrorInfo more more conveniently.

Parameters
errorTypeThis is ErrorType
remoteHostID of the remote correspondent
commentString Attached string related to the error
lastReceivedMessageMessage Last received message
Returns
Generated ErrorInfoPtr
static ErrorInfoPtr Proud::ErrorInfo::FromSocketError ( ErrorType  code,
SocketErrorCode  se 
)
static

TODO:translate needed. Through ErrorInfo::FromSocketError(), you can make ErrorInfo more conveniently.

Parameters
codeErrorType
seSocket error type
Returns
generated ErrorInfoPtr
PROUD_API String Proud::ErrorInfo::ToString ( ) const

Change error contents to string

static PROUD_API const PNTCHAR* Proud::ErrorInfo::TypeToString ( ErrorType  e)
static

Change error contents to string

static PROUD_API const PNTCHAR* Proud::ErrorInfo::TypeToString_Chn ( ErrorType  e)
static

Change ErrorType value to string (Simplified Chinese)

static PROUD_API const PNTCHAR* Proud::ErrorInfo::TypeToString_Eng ( ErrorType  e)
static

Change ErrorType value to string (English)

static PROUD_API const PNTCHAR* Proud::ErrorInfo::TypeToString_Jpn ( ErrorType  e)
static

ErrorType 값을 문자열로 변환한다. (일본어)

static PROUD_API const PNTCHAR* Proud::ErrorInfo::TypeToString_Kor ( ErrorType  e)
static

Change ErrorType value to string (Korean)

Member Data Documentation

String Proud::ErrorInfo::m_comment

Information of additional string

ErrorType Proud::ErrorInfo::m_detailType

Value for m_errorType

m_detailType indicates how disconnection occurs with more details at INetClientEvent.OnLeaveServer and INetServerEvent.OnClientLeave For an example, it enters ErrorType_TCPConnectFailure when disconnection occurs as client program terminates or enters ErrorType_ConnectServerTimeout when disconnection occurs due to power failure and/or physical cable disconnection.

ErrorType Proud::ErrorInfo::m_errorType

Error type. If there is no error then ErrorType_Ok.

HRESULT Proud::ErrorInfo::m_hResult

HRESULT value using for DB

ByteArray Proud::ErrorInfo::m_lastReceivedMessage

Save wrong last message when case of ErrorType_InvalidPacketFormat

HostID Proud::ErrorInfo::m_remote

Host that occur error

SocketErrorCode Proud::ErrorInfo::m_socketError

Error code for socket error

String Proud::ErrorInfo::m_source

Source using for DB