![]() P4API Error Messages Returned by p4GetLastError and p4GetLastStatusCodes |
![]() DEVELOPER |
![]() |
The API Error Code is the return value of p4GetLastError or p4GetLastStatusCodes. Use p4GetLastStatusCodes to get more detailed information for some errors, as described below. This detail consists of a Reason Code, and for some messages, a Sub Error Code as well.
Note that Reason / Sub-error code 97 can be returned for several calls. This means that there is no current session established. As the reason / sub-error codes are stored per-session, p4GetLastStatusCodes is unable to return their values unless a session has been successfully established by p4OpenPro4.
API Error Code |
Returned by API Function |
Message Description |
1 |
P4OpenPro4 |
Socket Open failed. Check that host name / IP address is correct; Bus Manager is running on host machine; port number is correct (verify Bus Manager is using same port number); [Note 1] |
2 |
(Any) |
Socket Close failed. [Note 1] |
3 |
(Any) |
Socket Send failed. [Note 1] |
4 |
(Any) |
Socket Receive failed. [Note 1] |
5 |
(Any) |
Socket Wait for Activity ('select' socket call) failed. [Note 1] |
10 |
P4SystemLogon |
Maximum System Sessions exceeded. [Sub Error = max allowed] |
11 |
P4SystemLogon |
Memory allocate failed for system session table. [Reason = system error code.] |
20 |
P4SystemLogon |
Maximum Kernel Sessions exceeded. [Sub Error = maximum allowed] |
21 |
P4SystemLogon |
Memory allocate failed for kernel session table. [Reason = system error code.] |
30 |
p4OpenPro4 |
Error starting a kernel session. Reason 1 = Bus Manager returned an error; Sub Error = Manager Status Code, as for API Error Code 47. Other Reasons = TCP/IP error code [Note 1]; Sub Error = 0. |
35 |
p4ClosePro4 |
Error closing kernel session. Reason 1 = Bus Manager returned an error; Sub Error = Manager Status Code, as for API Error Code 47. Other Reasons = TCP/IP error code [Note 1]; Sub Error = 0. |
40 |
p4ExecTask |
Invalid request reply parameter received from kernel. [Internal Error] |
41 |
p4ExecTask |
Invalid request reply parameter received from kernel. Reason 0 = socket receive error; Sub Error = TCP/IP error code [Note 1] Other Reasons = invalid reply type value. [Internal Error] |
42 |
p4ExecTask |
Parameter-Format parameter to p4ExecTask is invalid. |
43 |
p4ExecTask |
Error allocating memory for Parameter Buffer: [Sub Error = size requested] |
44 |
p4ExecTask |
Starting a GUI Screen Client on a non-Win32 platform is not supported. [p4SetScreenRequestFunction() may be used to write your own startup code.] |
45 |
p4ExecTask |
Failed to start screen Client program. Reason = system error code (Win32: from CreateProcess() system call; Unix: errno from system() command). |
Note 1: These indicate a TCP/IP error has occurred. The Reason code is the Winsock Error code (for Windows kernels), or the system error code (errno value) for Unix kernels.
API Error Code |
Returned by API Function |
Message Description |
46 |
p4ExecTask |
Kernel Bus Interface returned an error status. [Also see API Error Code 51 for most other Kernel failure cases.] Reason Codes: 1 = Task Bus (Pro4Bus) Initialization failed. 99 = Kernel startup failed Sub Error Codes for Reason 1: XX = the PROIV system error number (see System Errors.) 113 = Error opening TERMMAST.PRO file. 114 = 'DEFAULT' record not found in TERMMAST.PRO 115 = Memory allocation failed [During Kernel startup] 116 = Terminal/System defaults initialization failed. [Error during open / read of TERMMAST.PRO, CRTCTL.PRO or SYSDEF.PRO]
|
API Error Code |
Returned by API Function |
Message Description |
47 |
p4ExecTask |
Bus Kernel Manager returned an error Status Codes: -1 = Client table full -2 = Kernel table full -3 = Environment table full -4 = Security table full -5 = Environment string too long -6 = API instance string too long [Internal Error] -7 = System Security string too long [Internal Error] -8 = System username / password incorrect -9 = Error starting kernel process (Unix: fork( ) failed) -10 = memory allocation failed -11 = Invalid request Function Code received [Internal Error] -12 = Bad communication with kernel [Many reasons, maybe socket communication error / disconnect] -13 = PROIV Virtual Machine failed to start within timeout interval. -1024 = PROIV Virtual Machine stopped running mid-process, often related to an application error -1027 = PROIV Gateway Server session timed out before the process completed -1028 = PROIV Gateway Manager could not obtain a licence |
48 |
p4ExecTask |
P4API caller’s return parameter block for p4ExecTask() is too small. Reason Code = supplied block size in bytes; Sub Error Code = required size. [Note: for Parameter Format 'D', required size is to end of parameter currently being parsed: total required size could be larger.] |
49 |
p4ExecTask |
Memory allocation for status variables block failed. Reason Code = system error code from malloc(). |
50 |
p4ExecTask |
Invalid format for Bus Interface status code, reason code or sub-error code received. [Internal error.] |
API Error Code |
Returned by API Function |
Message Description |
51 |
p4ExecTask |
Task failed. (Also see API Error Code 46 for some Bus Interface specific failures.) Status Codes: -2 = Task Aborted by P4API p4Interrupt() call. -1 = Task didn’t complete normally. 1 = Task Initialization failed. Reason Codes for all Status Codes except -1: 3 = Operator Logon failed. (PROIV Logon failed: Operator-Id doesn’t exist in specified Company/Division Code, or Password Incorrect) 4 = Task Request Structure Initialization failed. 5 = Task Execution failed Reason Codes for Status Code -1 / SubError Codes for other Status Codes: 100 = System Variables load failure. 101 = memory allocation failed for FUNCTDEF file structure. 102 = FUNCTDEF file read failure. 103 = Function security failure (Operator-id does not have sufficient access privileges to run one of the functions in the task.) 104 = Function GEN failure 105 = Function load failure 106 = Memory allocation failed for Job structure 107 = Function Execution failed 108 = TASKDEF read error 109 = Task re-GEN failure 110 = Task Parameter not found. (Unknown task parameter name passed in parameter list.) |
51 |
p4ExecTask |
111 = Task not found 112 = Task Parameter: Incorrect data type. (Invalid number passed for numeric parameter.) 113 = error opening TERMMAST.PRO file. 114 = 'DEFAULT' record not found in TERMMAST.PRO 115 = Memory allocation failed [During Kernel startup] 116 = Terminal/System defaults initialization failed. (Error during open / read of TERMMAST.PRO, CRTCTL.PRO or SYSDEF.PRO) 117 = Screen Client disconnected 118 = Array index out of bounds 119 = Parameter type mismatch 120 = Error setting task codeset 121 = Error reading request info block 122 = Decrypt of operator logon/password failed 123 = Error performing codeset conversion 124 = No Development or Component Mode Option license seats available or count exceeded 125 = Not a secure connection 126 = Daemon Id Block error with code set 127 = Daemon Id Block wrong number of parameters 128 = Daemon Id Block invalid IP address 129 = Daemon Id Block Bad session ID 130 = Daemon Id Block Bad request ID 131 = Daemon Id Block Bad API Version 132 = Error flushing report output 133 = Error processing XML report 134 = Insufficient memory for RESTful task input parameter 152 = Overall parameter size too large |
60 |
P4ExecTask (report output callback) |
Buffer for receiving report output data too small / memory allocation error. Sub Error = required size. (Bytes). |
70 |
(Any) |
Invalid numeric value received for length field in Bus Interface request. (Internal error.) |
71 |
(Any) |
Invalid sign/digit received for numeric field in Bus Interface header. (Internal error.) |
72 |
(Any) |
Buffer too small for data received from Kernel. |
80 |
(Any) |
Invalid # parameters field for Bus Interface header. (Internal error or socket error.) |
97 |
(Any) |
No current Virtual Machine session. Can occur if you issue P4API requests out of order, or issue a request before a successful p4OpenPro4. This value can also be returned in the Reason or Sub-Error fields. |
98 |
(Any) |
Can’t access thread global memory. (Internal error.) |
99 |
|
This Bus Function is not currently implemented. |
Topic ID: 540099