DayZ 1.24
|
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerModule instances inserted in Init. API comes with several functions to Create, Throw and extract data from error codes. The format used is an int which is made up of two shorts, one that holds the category and one that holds the code. Therefore when looking at an error code, it is much easier to identify when looking at the hex value. More...
Private Member Functions | |
void | SafeAddModule (notnull ErrorHandlerModule errorModule) |
Wrapper for AddModule to give feedback whether it succeeded or not. | |
void | SafeRemoveModule (notnull ErrorHandlerModule errorModule) |
Wrapper for RemoveModule to give feedback whether it succeeded or not. | |
void | SafeRemoveModule (ErrorCategory category) |
Wrapper for RemoveModule to give feedback whether it succeeded or not. | |
void | Init () |
Gets called shortly after creation of ErrorModuleHandler. | |
void | OnEvent (EventType eventTypeId, Param params) |
is called by DayZGame to pass Events. | |
Static Private Member Functions | |
static proto int | ThrowError (ErrorCategory category, int code, string additionalInfo="") |
Creates and throws the error code, sending it to the handler of the category. | |
static proto int | ThrowErrorCode (int errorCode, string additionalInfo="") |
Throws the error code and sends it to the handler of the category. | |
static proto int | CreateError (ErrorCategory category, int code) |
Creates full error code. | |
static proto ErrorCategory | GetCategoryFromError (int errorCode) |
Returns the category the error was thrown from. | |
static proto int | GetCodeFromError (int errorCode) |
Returns the code of the error. | |
static proto owned string | GetErrorHex (int errorCode) |
Returns a formatted string of the error code. | |
static proto bool | AddModule (ErrorCategory category, notnull ErrorHandlerModule errorModule) |
Adds a module handler to the ErrorModuleHandler. | |
static proto bool | RemoveModule (ErrorCategory category) |
Removes a module handler from the ErrorModuleHandler. | |
static proto string | GetClientMessage (ErrorCategory category, int code, string additionalInfo="") |
Gets the Client Message for specified error. | |
static proto string | GetClientMessageByCode (int errorCode, string additionalInfo="") |
Gets the Client Message for specified error. | |
static proto string | GetLastClientMessage (ErrorCategory category, int code) |
Gets the Client Message for specified error, while attempting to restore information on the most recent error. | |
static proto string | GetLastClientMessageByCode (int errorCode) |
Gets the Client Message for specified error, while attempting to restore information on the most recent error. | |
static proto string | GetServerMessage (ErrorCategory category, int code, string additionalInfo="") |
Gets the Server Message for specified error. | |
static proto string | GetServerMessageByCode (int errorCode, string additionalInfo="") |
Gets the Server Message for specified error. | |
static proto string | GetLastServerMessage (ErrorCategory category, int code) |
Gets the Server Message for specified error, while attempting to restore information on the most recent error. | |
static proto string | GetLastServerMessageByCode (int errorCode) |
Gets the Server Message for specified error, while attempting to restore information on the most recent error. | |
static proto native ErrorModuleHandler | GetInstance () |
Gets the EMH Instance. | |
static proto void | GetErrorModules (notnull out array< ErrorHandlerModule > errorModules) |
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerModule instances inserted in Init. API comes with several functions to Create, Throw and extract data from error codes. The format used is an int which is made up of two shorts, one that holds the category and one that holds the code. Therefore when looking at an error code, it is much easier to identify when looking at the hex value.
Definition at line 28 of file ErrorModuleHandler.c.
|
staticprivate |
Adds a module handler to the ErrorModuleHandler.
category | ErrorCategory Category the module is for |
errorModule | ErrorHandlerModule The class containing the information and codes for the category. |
bool
Whether the adding of the module was successful or not Referenced by SafeAddModule().
|
staticprivate |
Creates full error code.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
int
The full error code
|
staticprivate |
Returns the category the error was thrown from.
errorCode | int The full error code |
ErrorCategory
The ErrorCategory the error was thrown from
|
staticprivate |
Gets the Client Message for specified error.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
additionalInfo | string Any additional info regarding the error, usually data |
string
The message which would appear on Client Referenced by OnlineServices::ErrorCaught(), and ServerBrowserTab::OnLoadServersAsyncConsole().
|
staticprivate |
Gets the Client Message for specified error.
errorCode | int The full error code |
additionalInfo | string Any additional info regarding the error, usually data |
string
The message which would appear on Client Returns the code of the error.
errorCode | int The full error code |
int
The code of the error Referenced by GetProperties(), and ConnectErrorScriptModuleUI::OnModalResult().
Returns a formatted string of the error code.
errorCode | int The full error code |
string
A formatted string of the error code Referenced by GetLastClientMessage(), GetLastServerMessage(), GetProperties(), ErrorHandlerModule::GetSimpleMessage(), HandleError(), ErrorHandlerModule::OnErrorThrown(), and OnErrorThrown().
|
staticprivate |
Referenced by OnEvent().
|
staticprivate |
Gets the EMH Instance.
ErrorModuleHandler
The ErrorModuleHandler Instance Referenced by CGame::OnEvent(), and EnProfilerTests::TestFuncCountData().
|
staticprivate |
Gets the Client Message for specified error, while attempting to restore information on the most recent error.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
string
The message which would appear on Client Gets the Client Message for specified error, while attempting to restore information on the most recent error.
errorCode | int The full error code |
string
The message which would appear on Client
|
staticprivate |
Gets the Server Message for specified error, while attempting to restore information on the most recent error.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
string
The message which would appear on Server Gets the Server Message for specified error, while attempting to restore information on the most recent error.
errorCode | int The full error code |
string
The message which would appear on Server
|
staticprivate |
Gets the Server Message for specified error.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
additionalInfo | string Any additional info regarding the error, usually data |
string
The message which would appear on Server
|
staticprivate |
Gets the Server Message for specified error.
errorCode | int The full error code |
additionalInfo | string Any additional info regarding the error, usually data |
string
The message which would appear on Server
|
inlineprivate |
Gets called shortly after creation of ErrorModuleHandler.
Definition at line 236 of file ErrorModuleHandler.c.
References ConnectErrorScriptModule(), g_Game, and SafeAddModule().
is called by DayZGame to pass Events.
Definition at line 251 of file ErrorModuleHandler.c.
References GetErrorModules().
|
staticprivate |
Removes a module handler from the ErrorModuleHandler.
category | ErrorCategory Category the module is for |
bool
Whether the removing of the module was successful or not Referenced by SafeRemoveModule(), and SafeRemoveModule().
|
inlineprivate |
Wrapper for AddModule to give feedback whether it succeeded or not.
errorModule | ErrorHandlerModule The ErrorHandlerModule to add |
Definition at line 207 of file ErrorModuleHandler.c.
References AddModule(), and Error().
Referenced by Init().
|
inlineprivate |
Wrapper for RemoveModule to give feedback whether it succeeded or not.
category | ErrorCategory Category to remove |
Definition at line 227 of file ErrorModuleHandler.c.
References Error(), and RemoveModule().
|
inlineprivate |
Wrapper for RemoveModule to give feedback whether it succeeded or not.
errorModule | ErrorHandlerModule The ErrorHandlerModule to add |
Definition at line 217 of file ErrorModuleHandler.c.
References Error(), and RemoveModule().
|
staticprivate |
Creates and throws the error code, sending it to the handler of the category.
category | ErrorCategory Category the error is thrown from |
code | int The code that the error belongs to inside the category between [-32768, 32767] |
additionalInfo | string Any additional info regarding the error, usually data |
int
The full error code Referenced by CGame::TryConnect().
|
staticprivate |
Throws the error code and sends it to the handler of the category.
errorCode | int The full error code |
additionalInfo | string Any additional info regarding the error, usually data |
int
The full error code