Data Structures | |
class | ErrorHandlerModule |
Definition and API of an ErrorHandlerModule - Do not insert any logic here! (as this class is not moddable) More... | |
Functions | |
void | ErrorHandlerModuleScript () |
Constructor, by default calls the function that will fill the ErrorDataMap. | |
void | ~ErrorHandlerModuleScript () |
void | InitOptionalVariables () |
Function which gets called before FillErrorDataMap, designed to set Optional Variales before ErrorProperties are created. | |
void | FillErrorDataMap () |
Function to fill up m_ErrorDataMap, gets called in the Constructor. | |
ErrorProperties | GetProperties (int errorCode) |
Fetches the ErrorProperties for the error code. | |
override string | GetClientMessage (int errorCode, string additionalInfo="") |
Fetches the Client message for the error code. | |
override string | GetLastClientMessage (int errorCode) |
Fetches the Client message for the error code, attempting to retrieve the data from the latest. | |
override string | GetServerMessage (int errorCode, string additionalInfo="") |
Fetches the Server message for the error code. | |
override string | GetLastServerMessage (int errorCode) |
Fetches the Server message for the error code, attempting to retrieve the data from the latest. | |
protected override void | OnErrorThrown (int errorCode, owned string additionalInfo="") |
Event that gets triggered when an error of the owned category is thrown. Do not call directly! Call ErrorModuleHandler.ThrowError instead. | |
void | InsertDialogueErrorProperties (int code, string message, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling, using the Optional Variables. | |
void | InsertHeaderDialogueErrorProperties (int code, string message, string header, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling with custom header. | |
void | InsertPrefixDialogueErrorProperties (int code, string message, string prefix, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling with custom prefix. | |
void | InsertExtendedPrefixDialogueErrorProperties (int code, string message, string prefix, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling with extended prefix. | |
void | InsertExtendedPrefixSplitDialogueErrorProperties (int code, string message, string prefix, string serverMessage, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling with extended prefix and separate server message. | |
void | InsertSplitDialogueErrorProperties (int code, string message, string serverMessage, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true) |
Insert an error with Dialogue as handling with separate server message. | |
void | InsertErrorProperties (int code, string message="") |
Insert an error with no handling. | |
Variables | |
class ErrorHandlerModule | m_Header = "" |
This is where to input logic and extend functionality of ErrorHandlerModule. | |
protected string | m_Prefix = "" |
Optional: Prefix (e.g. Fixed text at the start of the messages in the module) | |
protected ref UIScriptedMenu | m_UIHandler = null |
Optional: The UI the handler might generally use | |
protected int | m_LastErrorThrown = 0 |
Holds the last thrown error in this module, defaults to 0. | |
protected string | m_LastAdditionalInfo = "" |
Holds the last additional info passed in. | |
protected ref map< int, ref ErrorProperties > | m_ErrorDataMap = new map<int, ref ErrorProperties>() |
Map containing the codes that exist for the ErrorHandlerModule The code links to ErrorProperties This contains at the very least the Message for the error Additionally, it can contain the way to handle the error (e.g. Throw a Dialogue with the message) | |
void ErrorHandlerModuleScript | ( | ) |
Constructor, by default calls the function that will fill the ErrorDataMap.
References FillErrorDataMap(), and InitOptionalVariables().
void FillErrorDataMap | ( | ) |
Function to fill up m_ErrorDataMap, gets called in the Constructor.
Already insert the default "UNKNOWN ERROR" message for code "-1"
References InsertDialogueErrorProperties().
Referenced by ErrorHandlerModuleScript().
Fetches the Client message for the error code.
errorCode | int The full error code |
string
The Client message for the error References ErrorProperties::GetClientMessage(), and GetProperties().
Fetches the Client message for the error code, attempting to retrieve the data from the latest.
errorCode | int The full error code to check against |
string
The Client message for the error References ErrorEx, ErrorHandlerModule::GetClientMessage(), ErrorModuleHandler::GetErrorHex(), m_LastAdditionalInfo, and m_LastErrorThrown.
Fetches the Server message for the error code, attempting to retrieve the data from the latest.
errorCode | int The full error code to check against |
string
The Server message for the error References ErrorEx, ErrorModuleHandler::GetErrorHex(), ErrorHandlerModule::GetServerMessage(), m_LastAdditionalInfo, and m_LastErrorThrown.
ErrorProperties GetProperties | ( | int | errorCode | ) |
Fetches the ErrorProperties for the error code.
errorCode | int The full error code |
ErrorProperties
The data and handling for the error References Error(), ErrorModuleHandler::GetCodeFromError(), ErrorModuleHandler::GetErrorHex(), and m_ErrorDataMap.
Referenced by GetClientMessage(), GetServerMessage(), and OnErrorThrown().
Fetches the Server message for the error code.
errorCode | int The full error code |
string
The Server message for the error References GetProperties(), and ErrorProperties::GetServerMessage().
void InitOptionalVariables | ( | ) |
Function which gets called before FillErrorDataMap, designed to set Optional Variales before ErrorProperties are created.
Referenced by ErrorHandlerModuleScript().
void InsertDialogueErrorProperties | ( | int | code, |
string | message, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling, using the Optional Variables.
References DialogueErrorProperties(), m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandler.
Referenced by ClientKickedModule::FillErrorDataMap(), ConnectErrorClientModule::FillErrorDataMap(), FillErrorDataMap(), ConnectErrorServerModule::FillErrorDataMap(), and BIOSErrorModule::InsertBIOSError().
Insert an error with no handling.
References m_ErrorDataMap.
Referenced by BIOSErrorModule::FillErrorDataMap(), ClientKickedModule::FillErrorDataMap(), ConnectErrorClientModule::FillErrorDataMap(), and BIOSErrorModule::InsertBIOSError().
void InsertExtendedPrefixDialogueErrorProperties | ( | int | code, |
string | message, | ||
string | prefix, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling with extended prefix.
References DialogueErrorProperties(), m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandler.
Referenced by ClientKickedModule::FillErrorDataMap().
void InsertExtendedPrefixSplitDialogueErrorProperties | ( | int | code, |
string | message, | ||
string | prefix, | ||
string | serverMessage, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling with extended prefix and separate server message.
References DialogueErrorProperties(), m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandler.
Referenced by ClientKickedModule::FillErrorDataMap().
void InsertHeaderDialogueErrorProperties | ( | int | code, |
string | message, | ||
string | header, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling with custom header.
References DialogueErrorProperties(), m_ErrorDataMap, m_Prefix, and m_UIHandler.
void InsertPrefixDialogueErrorProperties | ( | int | code, |
string | message, | ||
string | prefix, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling with custom prefix.
References DialogueErrorProperties(), m_ErrorDataMap, m_Header, and m_UIHandler.
Referenced by ClientKickedModule::FillErrorDataMap().
void InsertSplitDialogueErrorProperties | ( | int | code, |
string | message, | ||
string | serverMessage, | ||
int | dialogButtonType = DBT_OK , |
||
int | defaultButton = DBB_OK , |
||
int | dialogMeaningType = DMT_EXCLAMATION , |
||
bool | displayAdditionalInfo = true |
||
) |
Insert an error with Dialogue as handling with separate server message.
References DialogueErrorProperties(), m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandler.
Referenced by ClientKickedModule::FillErrorDataMap().
Event that gets triggered when an error of the owned category is thrown. Do not call directly! Call ErrorModuleHandler.ThrowError instead.
errorCode | int The full error code |
additionalInfo | string Any additional info regarding the error, usually data |
References ErrorEx, GetCategory(), ErrorModuleHandler::GetErrorHex(), GetProperties(), ErrorProperties::HandleError(), m_ErrorDataMap, m_LastAdditionalInfo, m_LastErrorThrown, and ToString().
void ~ErrorHandlerModuleScript | ( | ) |
References m_UIHandler.
protected ref map<int, ref ErrorProperties> m_ErrorDataMap = new map<int, ref ErrorProperties>() |
Map
containing the codes that exist for the ErrorHandlerModule The code links to ErrorProperties This contains at the very least the Message for the error Additionally, it can contain the way to handle the error (e.g. Throw a Dialogue with the message)
Referenced by GetProperties(), InsertDialogueErrorProperties(), InsertErrorProperties(), InsertExtendedPrefixDialogueErrorProperties(), InsertExtendedPrefixSplitDialogueErrorProperties(), InsertHeaderDialogueErrorProperties(), InsertPrefixDialogueErrorProperties(), InsertSplitDialogueErrorProperties(), and OnErrorThrown().
class ErrorHandlerModule m_Header = "" |
This is where to input logic and extend functionality of ErrorHandlerModule.
Optional:
Header (e.g. The header of a Dialogue box)
Referenced by DialogueErrorProperties(), HandleError(), BIOSErrorModule::InitOptionalVariables(), ClientKickedModule::InitOptionalVariables(), ConnectErrorClientModule::InitOptionalVariables(), ConnectErrorServerModule::InitOptionalVariables(), InsertDialogueErrorProperties(), InsertExtendedPrefixDialogueErrorProperties(), InsertExtendedPrefixSplitDialogueErrorProperties(), InsertPrefixDialogueErrorProperties(), and InsertSplitDialogueErrorProperties().
protected string m_LastAdditionalInfo = "" |
Holds the last additional info passed in.
Referenced by GetLastClientMessage(), GetLastServerMessage(), and OnErrorThrown().
protected int m_LastErrorThrown = 0 |
Holds the last thrown error in this module, defaults to 0.
Referenced by GetLastClientMessage(), GetLastServerMessage(), OnErrorThrown(), ConnectErrorClientModule::OnEvent(), OnEvent(), and ConnectErrorServerModule::OnEvent().
protected string m_Prefix = "" |
Optional:
Prefix (e.g. Fixed text at the start of the messages in the module)
Referenced by ClientKickedModule::InitOptionalVariables(), InsertDialogueErrorProperties(), InsertExtendedPrefixDialogueErrorProperties(), InsertExtendedPrefixSplitDialogueErrorProperties(), InsertHeaderDialogueErrorProperties(), and InsertSplitDialogueErrorProperties().
protected ref UIScriptedMenu m_UIHandler = null |
Optional:
The UI the handler might generally use
Referenced by InsertDialogueErrorProperties(), InsertExtendedPrefixDialogueErrorProperties(), InsertExtendedPrefixSplitDialogueErrorProperties(), InsertHeaderDialogueErrorProperties(), InsertPrefixDialogueErrorProperties(), InsertSplitDialogueErrorProperties(), and ~ErrorHandlerModuleScript().