class ErrorHandlerModuleScriptSource
ErrorHandlerModuleScript › ErrorHandlerModule
All members, including inherited
Constructors 2
void ErrorHandlerModuleScript()Constructor, by default calls the function that will fill the ErrorDataMap
void ~ErrorHandlerModuleScript()Members 6
protected string m_Header = ""Optional: Header (e.g. The header of a Dialogue box)
Show 7 more
, ConnectErrorScriptModule.InitOptionalVariables(), ConnectErrorServerModule.InitOptionalVariables(), InsertDialogueErrorProperties(), InsertExtendedPrefixDialogueErrorProperties(), InsertExtendedPrefixSplitDialogueErrorProperties(), InsertPrefixDialogueErrorProperties(), and InsertSplitDialogueErrorProperties()protected string m_Prefix = ""Optional: Prefix (e.g. Fixed text at the start of the messages in the module)
protected ref UIScriptedMenu m_UIHandler = nullOptional: The UI the handler might generally use
protected int m_LastErrorThrown = 0Holds 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)
Methods 15
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.
errorCodeintThe full error code
Returns: ErrorProperties The data and handling for the error
Show 3 more
, ErrorModuleHandler.GetCodeFromError(), ErrorModuleHandler.GetErrorHex(), and m_ErrorDataMapFetches the Client message for the error code.
errorCodeintThe full error code
Returns: string The Client message for the error
Fetches the Client message for the error code, attempting to retrieve the data from the latest.
errorCodeintThe full error code to check against
Returns: string The Client message for the error
Show 3 more
, ErrorModuleHandler.GetErrorHex(), m_LastAdditionalInfo, and m_LastErrorThrownFetches the Server message for the error code.
errorCodeintThe full error code
Returns: string The Server message for the error
Fetches the Server message for the error code, attempting to retrieve the data from the latest.
errorCodeintThe full error code to check against
Returns: string The Server message for the error
Show 3 more
, GetServerMessage(), m_LastAdditionalInfo, and m_LastErrorThrownEvent that gets triggered when an error of the owned category is thrown. Do not call directly! Call ErrorModuleHandler.ThrowError instead
errorCodeintThe full error codeadditionalInfostringAny additional info regarding the error, usually data
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
Show 4 more
, m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandlervoid 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
Show 3 more
, m_ErrorDataMap, m_Prefix, and m_UIHandlervoid 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
Show 3 more
, m_ErrorDataMap, m_Header, and m_UIHandlervoid 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
Show 4 more
, m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandlervoid 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
Show 4 more
, m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandlervoid 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
Show 4 more
, m_ErrorDataMap, m_Header, m_Prefix, and m_UIHandlerInsert an error with no handling