These error codes are used by System APIs to indicate common mathematical, file, communications, and client/server errors. The errors may also be returned by non-System APIs where appropriate. APIs may also use additional error codes where the core set is not sufficient.
Error codes are returned to clients in three circumstances:
as a simple TInt
return value from a
synchronous function
as a leave code from a leaving function, which can be caught in a trap harness
in a request status, when an asynchronous request function completes