DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnErrorThrown()

override void OnErrorThrown ( int errorCode,
owned string additionalInfo = "" )
protected

Event that gets triggered when an error of the owned category is thrown. Do not call directly! Call ErrorModuleHandler.ThrowError instead.

Аргументы
errorCodeint The full error code
additionalInfostring Any additional info regarding the error, usually data

См. определение в файле ErrorHandlerModule.c строка 206

207 {
208 super.OnErrorThrown(errorCode, additionalInfo);
209
210 m_LastErrorThrown = errorCode;
211 m_LastAdditionalInfo = additionalInfo;
212
213 ErrorProperties properties = GetProperties(errorCode);
214
215 if ( properties )
216 {
217 properties.HandleError(errorCode, additionalInfo);
218 }
219 else
220 {
221 ErrorEx(string.Format("Error code %1(%2) was thrown but no ErrorProperties was found for it in category %3.", errorCode, ErrorModuleHandler.GetErrorHex(errorCode), GetCategory().ToString()));
222 if (m_ErrorDataMap.Find(-1, properties))
223 {
224 properties.HandleError(errorCode, additionalInfo);
225 }
226 }
227 }
proto string ToString()
string m_LastAdditionalInfo
Holds the last additional info passed in.
Определения ErrorHandlerModule.c:70
int m_LastErrorThrown
Holds the last thrown error in this module, defaults to 0.
Определения ErrorHandlerModule.c:69
ErrorProperties GetProperties(int errorCode)
Fetches the ErrorProperties for the error code.
Определения ErrorHandlerModule.c:112
ref map< int, ref ErrorProperties > m_ErrorDataMap
Map containing the codes that exist for the ErrorHandlerModule The code links to ErrorProperties This...
Определения ErrorHandlerModule.c:78
int GetCategory()
Определения PluginDayzPlayerDebug.c:81
static proto owned string GetErrorHex(int errorCode)
Returns a formatted string of the error code.
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
Определения ErrorModuleHandler.c:29
void HandleError(int errorCode, string additionalInfo="")
Определения ErrorProperties.c:16
Class which holds the properties and handling of an error.
Определения ErrorProperties.c:3
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, GetCategory(), ErrorModuleHandler::GetErrorHex(), GetProperties(), ErrorProperties::HandleError(), m_ErrorDataMap, m_LastAdditionalInfo, m_LastErrorThrown и ToString().