General Info | |
Interface: ErrorManager
Files: errormanager.h Last change: 11/04/2004 Author: Luiz Henrique Shigunov | 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
Constant | Value | Description |
---|---|---|
E_OK | 0x00 | Success |
E_BAD_INDEX | 0x01 | Invalid index |
E_BAD_VALUE | 0x02 | Invalid value |
E_BAD_TYPE | 0x03 | Invalid type |
E_MISMATCHED_VALUES | 0x04 | Mismatched values |
E_PERMISSION_DENIED | 0x05 | Permission denied |
E_FAULT | 0x06 | Invalid memory address |
E_NOT_ALLOWED | 0x07 | Operation not allowed |
E_NOT_INIT | 0x08 | Structure/object not initialized |
E_NOT_FOUND | 0x09 | Value/object/resource not found |
E_NOT_READY | 0x0a | Object/resource not ready |
E_NOT_EMPTY | 0x0b | Object/resource not empty |
E_NOT_IN_USE | 0x0c | Object/resource not in use |
E_EMPTY | 0x0d | Object/resource empty |
E_IN_USE | 0x0e | Value/object/resource in use |
E_BUSY | 0x0f | Busy |
E_TIMED_OUT | 0x10 | Operation timed out |
E_INTERRUPTED | 0x11 | Operation interrupted |
E_WOULD_BLOCK | 0x12 | Operation would block |
E_IO_ERROR | 0x13 | IO error |
E_TOO_BIG | 0x14 | Name/structure/buffer too big |
E_UNSUPPORTED | 0x15 | Operation not supported |
E_END_REACHED | 0x16 | End reached |
E_NO_MEMORY | 0x17 | Not enough memory available |
E_REGISTERED | 0x18 | Object/structure already registered |
E_NOT_REGISTERED | 0x19 | Object/structure not registered |
E_UNDEFINED | 0x1a | Undefined error |
E_NOT_IMPLEMENTED | 0x1b | Function/operation not implemented |
E_BUG | 0x1c | The interface specification was not met. For instance, a value in one of the arguments is not valid. |
E_NOT_USER_TASK | 0x1d | The task is not a user task |
E_NO_SUCH_UNIT | 0x1e | Unit does not exist |
E_BUFFER_TOO_SMALL | 0x1f | Buffer too small |
E_NO_SUCH_DRIVE | 0x20 | Drive does not exist |
E_NO_SUCH_INTERFACE | 0x21 | Interface does not exist |
E_INVALID_VERSION | 0x22 | Invalid version |
E_PROBE_FAILED | 0x23 | The probe failed |
E_NO_SUCH_IMPLEMENTATION | 0x24 | Implementation does not exist |
E_FILE_ERROR | 0x30 | Generic file error |
E_FILE_EXISTS | 0x31 | File already exist |
E_TOO_MANY_OPEN_FILES | 0x32 | Too many open files |
E_NOT_A_DIRECTORY | 0x33 | It's not a directory |
E_IS_A_DIRECTORY | 0x34 | It's a directory |
E_FS_FULL | 0x35 | File system full |
E_READ_ONLY_FS | 0x36 | Read only file system |
E_CORRUPTED_FS | 0x37 | Corrupted file system |
E_LOOP | 0x38 | Too many symbolic links encountered while traversing the path |
E_NOT_FILE_DIR | 0x39 | It's not a file neither a directory |
E_NO_MEDIA | 0x40 | Device without media |
E_MEDIA_CHANGED | 0x41 | Media has changed |
E_FORMAT_ERROR | 0x42 | Error while formating media |
E_READ_ONLY_DEVICE | 0x43 | Read only device |
E_LOADING_MODULE | 0x50 | Error loading module |
E_STARTING_MODULE | 0x51 | Error starting module |
E_SHUTTINGDOWN_MODULE | 0x52 | Error shutting down module |
E_INTERFACE_NOT_IMPLEMENTED | 0x53 | Interface not implemented |
E_BAD_FUNCTION_TYPE | 0x54 | Invalid function type (it's a user function and should be a system one or vice versa) |
E_MODULE | 0x55 | Generic module error |
E_HANDLED_INT | 0x70 | Interrupt was handled |
E_UNHANDLED_INT | 0x71 | Interrupt was not handled |
E_INVOKE_SCHEDULER | 0x72 | Interrupt was handled and scheduler must be called |