DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
BIOSErrorModule.c
Go to the documentation of this file.
1
7{
11 CANCEL
26
29
34
41
44
45 // RESERVED SPACE OF REDUNDANT ERRORS
46
51
54
57
60};
61
63{
65 {
66 SetCategory(ErrorCategory.BIOSError);
67 }
68
69 override void InitOptionalVariables()
70 {
71 super.InitOptionalVariables();
72
73 m_Header = "#STR_BIOS_BIOSError";
74 }
75
76 override void FillErrorDataMap()
77 {
78 super.FillErrorDataMap();
79
80 InsertErrorProperties(EBiosError.OK); // Not an error, so no message
81 InsertBIOSError(EBiosError.CANCEL , "#STR_BIOS_OperationCancelled");
82 InsertBIOSError(EBiosError.BAD_PARAMETER , "#STR_BIOS_BadParameter");
83 InsertBIOSError(EBiosError.NOT_FOUND , "#STR_BIOS_NotFound");
84 InsertBIOSError(EBiosError.NOT_IMPLEMENTED , "#STR_BIOS_NotImplemented");
85 InsertBIOSError(EBiosError.PURCHASE_REQUIRED , "#STR_BIOS_PurchaseRequired");
86 InsertBIOSError(EBiosError.NOT_ALLOWED , "#STR_BIOS_ActionRestricted");
87 InsertBIOSError(EBiosError.BANNED , "#STR_auth_publisher_ban");
88 InsertBIOSError(EBiosError.LOGICAL , "#STR_BIOS_APILogicError");
89
90 InsertBIOSError(EBiosError.WRONG_RESPONSE_DATA , "#STR_BIOS_UnexpectedFormat");
91
92 InsertBIOSError(EBiosError.SERVER_HEARTBEAT_SERVER_NOT_FOUND , "#STR_BIOS_ServerNotRegistered");
93 InsertBIOSError(EBiosError.SERVER_REGISTER_ALREADY_EXISTS , "#STR_BIOS_ServerAlreadyRegistered");
94
95 InsertBIOSError(EBiosError.REQUEST_CREATE_FAIL_XHR , "#STR_BIOS_FailedToOpenRequest");
96 InsertBIOSError(EBiosError.REQUEST_SEND_FAIL , "#STR_BIOS_FailedToSendData");
97 InsertBIOSError(EBiosError.REQUEST_WAIT_FAIL , "#STR_BIOS_FailedToWaitOperationEnd");
98
99 InsertBIOSError(EBiosError.NON_JSON_RESPONSE , "#STR_BIOS_UnexpectedFormat");
100
101 InsertBIOSError(EBiosError.UPDATE_REQUIRED , "#STR_BIOS_UpdateRequired");
102 InsertBIOSError(EBiosError.UPDATE_REQUIRED_AND_DOWNLOADED , "#STR_BIOS_UpdateRequiredAndDownloaded");
103
104 InsertBIOSError(EBiosError.COMUNICATION_ERROR , "#STR_BIOS_CommunicationError");
105
106 InsertBIOSError(EBiosError.UNKNOWN , "#server_browser_error_unknown");
107 InsertBIOSError(EBiosError.BAD_SCRIPT , "#STR_BIOS_LinkageError");
108 }
109
110 void InsertBIOSError(int code, string message)
111 {
112 #ifdef PLATFORM_CONSOLE
113 InsertDialogueErrorProperties(code, message);
114 #else
115 InsertErrorProperties(code, message);
116 #endif
117 }
118}
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
@ COMUNICATION_ERROR
23 - Resource is unreachable or unavailable, can be 404 or no internet connection (etc....
@ NOT_IMPLEMENTED
4 - The call is not supported for the current platform. Can be returned from any call.
@ NOT_ALLOWED
6 - The action is not allowed. (restricted, not enough permission)
@ LOGICAL
8 - API usage error. For example, usage of objects whos native lifetime ended. Can be returned from a...
@ PURCHASE_REQUIRED
5 - [XB] The action cannot be performed because the user does not own the content.
@ BAD_SCRIPT
25 - Extended error. Script not properly linked with engine. May be removed in future.
@ REQUEST_SEND_FAIL
13 - Failed to send the data
@ UPDATE_REQUIRED
21 - [PS] Mandatory update exist and is required.
@ OK
0 - No error. Can be returned from any call.
@ SERVER_HEARTBEAT_SERVER_NOT_FOUND
10 - Server is no longer registered
@ REQUEST_CREATE_FAIL_XHR
12 - Failed to open the request
@ WRONG_RESPONSE_DATA
9 - Response was of unexpected format
@ BAD_PARAMETER
1 - The operation was cancelled. See individual calls for details.
@ UNKNOWN
24 - Any other error. Can be returned from any call.
@ SERVER_REGISTER_ALREADY_EXISTS
11 - Server was already registered
@ NON_JSON_RESPONSE
15 - Response was expected to be in JSON format, but it was not
@ NOT_FOUND
3 - The call could not find some data. See individual calls for details.
@ REQUEST_WAIT_FAIL
14 - Failed to wait for the operation to end - only in a synchronous call
@ UPDATE_REQUIRED_AND_DOWNLOADED
22 - [PS] Mandatory update exist and is ready to install.
@ BANNED
7 - [XB] The user is banned from some action.
class ErrorHandlerModule m_Header
This is where to input logic and extend functionality of ErrorHandlerModule.
void ErrorHandlerModuleScript()
Constructor, by default calls the function that will fill the ErrorDataMap.
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 InsertErrorProperties(int code, string message="")
Insert an error with no handling.
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
override void InitOptionalVariables()
void InsertBIOSError(int code, string message)
override void FillErrorDataMap()