A universal set of error codes are provided for all functions that have a return type of ERROR. This standard allows you to easily identify errors and debug these problems when they are reported. Error codes are sent to the debugging tools with full descriptions, so use the run time debuggers for easy identification of errors. Here is a description of current error codes and what they mean:
Code | Name | Description |
0 | Okay | No error occurred, function has executed successfully. |
1 | NoMemory | Not enough memory was available when this function attempted to allocate a memory block. |
2 | NoPointer | A required address pointer was not present. |
3 | InUse | The resource, object, or other system part is currently in use. |
4 | Failed | An unspecified failure has occurred. |
5 | File | Unspecified file error, eg file not found, disk full etc. |
6 | Data | This function encountered some data that has unrecoverable errors. |
7 | Search | An internal search was performed and it failed. This is a specific error that can occur when the function is searching inside file headers for something, eg the BODY section of an IFF file. |
8 | InitModule | This function tried to initialise a module and failed. |
9 | FileMissing | File not found, this occurs when a Location field references a file that does not exist. |
10 | WrongVersion | Wrong version, or the specified version is not supported. |
11 | Args | You tried to pass invalid arguments to this function, such as a NULL value where you should have placed a pointer. |
12 | NoData | The procedure expected some data, but the program did not supply any. |
13 | Read | Occurs if you attempt to read a file and a failure occurs. Perhaps there is nothing left to read, the file object has been invalidated, or there are surface errors on the media in question. |
14 | Write | Occurs if you attempt to write to a file and a failure occurs. Usually this is due to a hardware problem such as lack of space or surface errors on the recording media. |
15 | LockFailed | This error can occur if you attempt to get a lock on an object that is already locked out by another task, or if you try to lock an object that does not exist. |
16 | ExamineFailed | This error applies to files and directories. It can occur for various reasons, a probable cause could be a corrupt/invalidated area of a disk structure. |
17 | LostClass | This is a very serious error, which occurs if an object loses its reference to its Class. This basically means that the Object->Class pointer has been cleared or invalidated. |
18 | NoAction | If you call an action on an object, and if the object does not support that action, you will receive this message. An example of this could occur by attempting to draw a file, e.g. Draw(File). |
19 | NoSupport | Can be caused if an object fails to initialise, often due to an unsupported data format. |
20 | Memory | General memory error, such as no memory available, or memory too fragmented. |
21 | TimeOut | A time-out can occur if a function is expected to complete a process within a certain amount of time (e.g. 5 seconds). If that time runs out, this error-code will be returned. |
22 | NoStats | This error indicates near-fatal corruption to an object. A private Stats structure is kept in the header of each object (Object->Stats) and if it is lost, there has been an illegal clearance of this field. |
23 | LowCapacity | Low capacity error or warning - usually occurs when an array is almost full. |
24 | Init | An error occurred on a call to the Init action. |
25 | NoPermission | A security violation has occurred. |
26 | SystemCorrupt | The operating system has been badly corrupted. |
27 | NeedContainer | Used if an object needs a container to operate correctly. |
28 | ContainerNeedsBitmap | The container needs a Bitmap field. Can usually be solved by using a different container or adding a virtual Bitmap field to the container's source code. |
29 | KernelVersion | The kernel version is not recent enough - you need to install a more recent kernel. |
30 | NeedWidthHeight | You need to specify a Width and Height for the object. |
31 | NegativeSubClassID | Occurs if the Child ID specified for a class is less than 0. |
32 | NegativeClassID | Occurs if the Class ID specified for a class is less than 0. |
33 | MissingClassName | A newly created class has not been given a name. |
34 | OutOfRange | Number is out of range. |
35 | ObtainMethod | A call to ObtainMethod() failed. |
36 | ArrayFull | An array has reached capacity and cannot be expanded. |
37 | Query | An attempt to Query() has failed for unspecified reasons. |
38 | LostContainer | The object has not been assigned a container. |
39 | DoNotExpunge | This code is returned by modules that do not want to be expunged by an expunge call. |
40 | MemoryCorrupt | Used when a memory block is known to be corrupt. |
41 | FieldSearch | The function could not find the field that you asked for. |
42 | InvalidPath | Invalid file or directory path detected. |
43 | SetField | An unspecific error occurred during a call to SetField(). |
44 | MarkedForDeletion | A resource cannot be accessed as it is marked for deletion. |
45 | IllegalMethodID | Illegal method ID (number outside of valid range). |
46 | IllegalActionID | Illegal action ID (number outside of valid range). |
47 | ModuleOpenFailed | Module failed in its Open routine. |
48 | IllegalActionAttempt | An illegal attempt was made to execute an action on an object that belongs to another Task. |
49 | EntryMissingHeader | The ModEntry Header is missing. |
50 | ModuleMissingInit | Module has not defined support for Init(). |
51 | ModuleInitFailed | Module failed its Initialisation routine. |
52 | MemoryDoesNotExist | Memory block does not exist - usually returned from memory functions such as FreeMemoryID() and MemoryPtrInfo(). |
53 | DeadLock | A dead-lock was detected and the procedure was aborted. A dead-lock occurs when a task wants to use a resource that some other task has locked, but the catch is, that other task is already waiting on you to release a resource. As two tasks cannot wait on each other, the procedure must be aborted to avoid the dead-lock. |
54 | SystemLockedUp | An unspecified area of the system is locked-up. This can occur if a shared memory block has been exclusively accessed and not released, or some other type of unreleased access has been made. |
55 | ModuleMissingName | A Module has not declared an official name. |
56 | AddClass | An attempt to add a new class to the system failed. |
57 | Activate | Error while Activate()ing an object. |
58 | ActionFailed | An (undefined) action call to an object failed. |
59 | DoubleInit | An attempt to initialise an object twice was detected. |
60 | FieldNotSet | A required field has not been set in the object. |
61 | MissingClass | An object is missing its class pointer (serious corruption to the object structure is likely). |
62 | FileReadFlag | The File flag FL_READ was not set on initialisation. |
63 | FileWriteFlag | The File flag FL_WRITE was not set on initialisation. |
64 | Draw | An error occurred while drawing the object. |
65 | NoMethods | The object/class does not export any methods. |
66 | NoMatchingObject | No matching object was found for the given object ID. |
67 | AccessDenied | Failed to gain access to a shared memory block. |
68 | MissingLocation | The object is missing a setting in the Location field. |
69 | NoExclusiveLock | There is no exclusive lock on this object. |
70 | NoSearchResult | The search yielded no results. |
71 | StatementUnsatisfied | The tested statement was not satisfied. |
72 | ObjectCorrupt | The object structure is badly corrupted. |
73 | ContainerPassThrough | Container pass through notification. |
74 | UnsupportedContainer | The given container is not supported by this object. |
75 | False | The result is False. |
76 | ExclusiveDenied | An attempt to gain exclusive access to a shared object failed. |
77 | AllocMemory | Attempts to allocate a memory block failed. |
78 | NewObject | A call to NewObject() failed to produce a new object. |
79 | GetField | A call to GetField() failed to retrieve a field value. |
80 | NoFieldAccess | Access to a field was denied (usually occurs due to limited field permissions, i.e. read only or write only). |
81 | ReservedAssign | ResolveAssign() did not resolve the assignment because it is a reserved name, or does not need resolving. |
82 | InvalidDimension | This error is typically returned when an attempt to set a dimension field (e.g. width or height) uses an invalid value such as -1. |
83 | FieldTypeMismatch | A field mismatch indicates that a field that was being read or written does not convert to the requested type. |
84 | UnrecognisedFieldType | While reading or writing a field, you requested a field type that is completely invalid. |
85 | BufferOverflow | Through the process of normal execution, a buffer was found to be too small to hold all necessary data required to complete the process. |
86 | DirectoryEmpty | This error is reported when attempting to list the contents of a directory that is actually empty. |
87 | UnsupportedField | A requested field is not supported by the object's class. |
88 | Mismatch | A mismatch has been detected that prevents further processing. |
89 | OutOfBounds | An out-of-bounds error has occurred. |
This error list was last updated May 2001.
Next: Module Development Guide
Table of Contents