General Info
Interface: ErrorManager
Files: errormanager.h
Last change: 11/04/2004
Author: Luiz Henrique Shigunov
Description

Description

To make development, identification and manipulation of functions errors, standard errors have been defined.

This manager doesn't has an implementation.

Some system functions return a pointer and because some pointer´s values are not valid, these values are used to return error codes.

The following macros were created for this case:

IS_PTR_ERROR(error) - returns true if the pointer error is an error.

PTR_TO_ERROR(error) - translate the pointer error into an integer.

ERROR_TO_PTR(error) - translate the interger error into a pointer.

If a function that returns void * wants to return the error E_FAULT it must do: return ERROR_TO_PTR(E_FAULT);

Return codes

ConstantValueDescription
E_OK0x00Success
E_BAD_INDEX0x01Invalid index
E_BAD_VALUE0x02Invalid value
E_BAD_TYPE0x03Invalid type
E_MISMATCHED_VALUES0x04Mismatched values
E_PERMISSION_DENIED0x05Permission denied
E_FAULT0x06Invalid memory address
E_NOT_ALLOWED0x07Operation not allowed
E_NOT_INIT0x08Structure/object not initialized
E_NOT_FOUND0x09Value/object/resource not found
E_NOT_READY0x0aObject/resource not ready
E_NOT_EMPTY0x0bObject/resource not empty
E_NOT_IN_USE0x0cObject/resource not in use
E_EMPTY0x0dObject/resource empty
E_IN_USE0x0eValue/object/resource in use
E_BUSY0x0fBusy
E_TIMED_OUT0x10Operation timed out
E_INTERRUPTED0x11Operation interrupted
E_WOULD_BLOCK0x12Operation would block
E_IO_ERROR0x13IO error
E_TOO_BIG0x14Name/structure/buffer too big
E_UNSUPPORTED0x15Operation not supported
E_END_REACHED0x16End reached
E_NO_MEMORY0x17Not enough memory available
E_REGISTERED0x18Object/structure already registered
E_NOT_REGISTERED0x19Object/structure not registered
E_UNDEFINED0x1aUndefined error
E_NOT_IMPLEMENTED0x1bFunction/operation not implemented
E_BUG0x1cThe interface specification was not met. For instance, a value in one of the arguments is not valid.
E_NOT_USER_TASK0x1dThe task is not a user task
E_NO_SUCH_UNIT0x1eUnit does not exist
E_BUFFER_TOO_SMALL0x1fBuffer too small
E_NO_SUCH_DRIVE0x20Drive does not exist
E_NO_SUCH_INTERFACE0x21Interface does not exist
E_INVALID_VERSION0x22Invalid version
E_PROBE_FAILED0x23The probe failed
E_NO_SUCH_IMPLEMENTATION0x24Implementation does not exist
E_FILE_ERROR0x30Generic file error
E_FILE_EXISTS0x31File already exist
E_TOO_MANY_OPEN_FILES0x32Too many open files
E_NOT_A_DIRECTORY0x33It's not a directory
E_IS_A_DIRECTORY0x34It's a directory
E_FS_FULL0x35File system full
E_READ_ONLY_FS0x36Read only file system
E_CORRUPTED_FS0x37Corrupted file system
E_LOOP0x38Too many symbolic links encountered while traversing the path
E_NOT_FILE_DIR0x39It's not a file neither a directory
E_NO_MEDIA0x40Device without media
E_MEDIA_CHANGED0x41Media has changed
E_FORMAT_ERROR0x42Error while formating media
E_READ_ONLY_DEVICE0x43Read only device
E_LOADING_MODULE0x50Error loading module
E_STARTING_MODULE0x51Error starting module
E_SHUTTINGDOWN_MODULE0x52Error shutting down module
E_INTERFACE_NOT_IMPLEMENTED0x53Interface not implemented
E_BAD_FUNCTION_TYPE0x54Invalid function type (it's a user function and should be a system one or vice versa)
E_MODULE0x55Generic module error
E_HANDLED_INT0x70Interrupt was handled
E_UNHANDLED_INT0x71Interrupt was not handled
E_INVOKE_SCHEDULER0x72Interrupt was handled and scheduler must be called