DIFF

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()
References m_UIHandler

Members 6

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)

Methods 15

void InitOptionalVariables()

Function which gets called before FillErrorDataMap, designed to set Optional Variales before ErrorProperties are created

ErrorProperties GetProperties(int errorCode)

Fetches the ErrorProperties for the error code.

errorCode
int The full error code

Returns: ErrorProperties The data and handling for the error

override string GetClientMessage(int errorCode, string additionalInfo = "")

Fetches the Client message for the error code.

errorCode
int The full error code

Returns: string The Client message for the error

override string GetLastClientMessage(int errorCode)

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

Returns: string The Client message for the error

override string GetServerMessage(int errorCode, string additionalInfo = "")

Fetches the Server message for the error code.

errorCode
int The full error code

Returns: string The Server message for the error

override string GetLastServerMessage(int errorCode)

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

Returns: string The Server message for the error

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

errorCode
int The full error code
additionalInfo
string Any 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

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