Error codes

Most of the functions in the libkate API return an integer value so errors can be flagged for the client code to check.

When a function succeeds, the return code will usually be 0, or in some cases positive, when extra status information needs to be returned. An error will be marked by returning a negative value. See each function's documentation more information.

It is strongly recommended that the client code checks return codes for errors.

These are the error codes that the libkate API can return: