K2 mode error codes

All K2 Client API functions return an error code, and K2Success is the successful return value. The following sections list the API error codes. These reflect actions of the cfsearch tag.

Generic error codes

Error code
No.
Description
K2Success
(0)
Operation completed successfully.
K2Fail
(-2)
A general failure not covered by another API error code.
K2Warn
(1)
A general warning.

Usage error codes

Error code
No.
Description
K2Error_NoConnectAvail
(-9)
A K2 connection is not available.
K2Error_BadArgStruct
(-10)
Invalid argument structure.
K2Error_BadHandleType
(-11)
Improper object type.
K2Error_HandleNotFound
(-12)
Object not found.
K2Error_MissingArgs
(-13)
Missing required arguments.
K2Error_InvalidArgs
(-14)
Invalid arguments.
K2Error_Unsupported
(-19)
Using an unsupported feature.

Runtime error codes

Error code
No.
Description
K2Error_NoMsgDb
(-20)
Cannot find the message database.
K2Error_FatalError
(-21)
Fatal error.
K2Error_OutOfMemory
(-22)
Out of memory.
K2Error_DiskFull
(-23)
Out of disk space.
K2Error_NoFileHandles
(-24)
Out of file handles.
K2Error_InvalidDoc
(-25)
Bad document ID or key (internal or external).
K2Error_FileNotFound
(-26)
File not found.
K2Error_ArgTooLarge
(-27)
Argument too large.
K2Error_InvalidSortSpec
(-28)
Invalid sort specification.
K2Error_GatewayNotAvail
(-29)
Gateway driver not available.
K2Error_VersionMismatch
(-30)
arg or Vdk Object mismatch.
K2Error_NoInstallDir
(-100)
Cannot find installation directory.

Data error codes

Error code
No.
Description
K2Error_StyleFiles
(-31)
Invalid style files.
K2Error_Permissions
(-32)
Bad file or directory permission.
K2Error_CollNotAvail
(-33)
The collection is not available because it is down or under repair. This error occurs only when the Verity search engine is attempting a submit action (for example, insert, update, or delete), to a collection. If this error is returned, the submit action does not occur.
K2Error_CollIll
(-34)
The collection is corrupt and needs repair.
K2Error_v3Legacy
(-35)
Unsupported on Legacy V3 database.
K2Error_CollRepair
(-36)
The collection has been repaired.
K2Error_CollReadOnly
(-37)
This collection is read-only. No submits are allowed.
K2Error_CollPurge
(-38)
Purge failed due to problems deleting from any of the following directories: pdd, work, trans
K2Error_CollPathTooBig
(-39)
Collection path supplied for the path member in K2CollectionOpenArgRec is too long.
K2Error_LocaleIncompat
(-101)
Collection and session locales are incompatible.
K2Error_KBNotOpened
(-102)
Knowledgebase cannot be opened.

Query error codes

Error code
No.
Description
K2Error_QueryParse
(-40)
Query has a parsing error.

Security error codes

ErrorCode
No.
Description
K2Error_InvalidUse
(-80)
Invalid user/password combination.

Remote connection error codes

Error code
No.
Description
K2Error_HostNotAvail
(-90)
Cannot contact remote host.
K2Error_NotReEntrant
(-91)
Not reentrant.
K2Error_CallDenied
(-92)
Call cannot be executed.

File handling error codes

Error code
No.
Description
K2Error_BadFile
(-140)
Corrupt or unreadable file.
K2Error_EmptyFile
(-141)
Empty file.
K2Error_ProtectedFile
(-142)
Password protected or encrypted.
K2Error_FilterNotAvail
(-143)
No appropriate filter.
K2Error_FilterLoadFailed
(-144)
Error during filter initialization.
K2Error_FileOpenFailed
(-145)
File could not be opened.

Dispatch error codes

Error code
No.
Description
K2Error_CouldntLoadDLL
(-200)
Cannot load DLL.
K2Error_NoSuchFunction
(-201)
Function not available.

Warning error codes

Error code
No.
Description
K2Warning_CollectionDown
(10)
The collection was down when it was opened.
K2Warning_QueryComplex
(11)
Too many matching words.
K2Warning_LowMemory
(12)
Memory is low for indexing.
K2Warning_CollectionReadOnly
(13)
The collection is read-only.
K2Warning_DriverNotFound
(14)
Couldn't locate specified driver.
K2Warning_LargeToken
(15)
Returned a token greater than maxSize.
K2Warning_ArgTooLarge
(16)
Argument too large.
K2Warning_DataSrcNotAvail
(17)
Cannot locate collection data.
K2Warning_SearchRestricted
(18)
Searching subset of collection.

TCP/IP error codes

Error code
No.
Description
K2TcpError_Memory
c100
Out of memory.
K2TcpError_ConnDrop
c200
Connection closed by remote host.
K2TcpError_WillBlock
c300
Will block on this call.
K2TcpError_Call_DNS
c600
DNS lookup failed (use IP address).
K2TcpError_Call_Send
c700
Send failed (maybe connection damaged).
K2TcpError_Call_Recv
c800
Recv failed (maybe connection damaged).
K2TcpError_Call_Ioctl
c900
Ioctl failed (Internal error).
K2TcpError_Call_Socket
ca00
Socket failed (maybe out of file handles).
K2TcpError_Call_Bind
cb00
Bind failed (local address already in use).
K2TcpError_Call_Listen
cc00
Listen failed (maybe out of resources).
K2TcpError_Call_Accept
cd00
Accept failed (maybe out of resources).
K2TcpError_Call_Select
ce00
Select failed (maybe connection damaged).
K2TcpError_Call_Connect
cf00
Connect failed (connection not accepted).

Comments