Error kinds and units
The error record of a call that failed holds a kind, a unit, and values. 38 kinds and 36 units.
Kinds
| Number | Kind | What value, limit and found hold |
|---|---|---|
| 0 | None | |
| 1 | Empty | A text argument has no byte. limit: the most that it can have. |
| 2 | Too_Long | value: the size of the argument; limit: the most that it can have. |
| 3 | Too_Small | value: the size of the argument; limit: the least that it must have. |
| 4 | Bad_Value | value: a value that the call refuses; limit: the largest value that it takes, or 0 when the sentence gives no range. |
| 5 | Bad_Flags | value: the flags; limit: the flags that the call knows. |
| 6 | Bad_Byte | value: the offset of the byte in the text; found: the byte. |
| 7 | Bad_Address | value: the address; limit: the count of bytes; found: 1 when the call writes there. |
| 8 | Handle_Absent | value: a number that names no handle of the caller. |
| 9 | Handle_Ended | value: the handle; found: an End. |
| 10 | Handle_Kind | value: the handle; limit: the kind of object that the call needs; found: the kind of its object (op.Object_Kind). |
| 11 | Handle_Rights | value: the handle; limit: the rights that the call needs; found: the rights of the handle (op.Rights). |
| 12 | Budget | value: the handle of the budget; limit: what the call asks; found: what the budget holds. |
| 14 | Over_Limit | value: what the call makes; limit: the limit. Unit Blocks (the storage service): the blocks of the current objects with the change, with no earlier version kept. |
| 15 | Full | A table has no free place. limit: its capacity. |
| 16 | State | value: the handle; found: the op.Program_State of its object, or 0 when the handle has no right Read. |
| 17 | Absent | No object has the name or the number of the argument. found: 0, or the number from 1 of the row of a table argument that names it. |
| 18 | Damaged | The object of the argument exists, and a block of it has a wrong check. |
| 19 | Device | A device reported an error. found: the status of the device. |
| 20 | No_Grant | The caller has no grant for this call: the unit says which grant. |
| 21 | Malformed | The module of the argument breaks a rule of the module format. value: the kind of the problem; found: the byte of the file. |
| 22 | No_Target | value: the handle of a memory object that names no one other program to receive the handle. |
| 23 | Overlap | value: an address, or with the unit Region an offset in the call region of an isolated call; limit: the count of bytes. They overlap something that the program has, or another argument of the call that is written. |
| 24 | Unknown_Operation | value: the number of the operation. |
| 25 | Refused | The call refused, and gives no more detail. found: the status (op.Status for the kernel). |
| 26 | No_Answer | No answer before the time limit. value: the IPv4 address that did not answer, or 0; limit: the milliseconds waited; found: what did not answer: 1 its hardware address (ARP), 2 the echo, 3 the device. |
| 27 | Unsupported | The receiver does not do this command. value: the command, or the field that it does not do. |
| 28 | Link_Down | The link of the network device is down. |
| 29 | Busy | Too many requests are in flight. value: the requests in flight, or 0 when the receiver does not count them; limit: the most. |
| 30 | Out_Of_Range | The argument names units past the end. value: the end of what it names (its first unit and its count); limit: the units that exist; found: 0, or the number from 1 of the record of a table argument that names them (a record that names bytes of another argument by an offset, docs/MODULE_CONTRACT.md, "Tables and bytes as parameters"). |
| 31 | Reserved | The argument names a program of the system that the call does not act on: it starts at boot, or it is a device service. |
| 32 | Not_Payer | value: the handle of a budget that does not pay for the memory object of the call. It says nothing of the budget. |
| 33 | Object_Shared | value: the handle of a memory object, or 0; the call needs an object that only this program names, with one mapping at most. |
| 34 | Object_Marked | value: the handle of a memory object; found: its pages with a protection of their own. The object is not mapped again and not given. |
| 35 | Whole_Only | value: an address; limit: the bytes of the range. The range is a part of a mapping whose protection changes only whole (device memory, large pages), or of an area that the system keeps (a thread area). |
| 36 | Not_Multiple | value: the argument; limit: the number that it must be a multiple of; found: the rest. |
| 37 | Not_Authentic | The bytes of the argument do not prove what they must: the tag of a sealed text, or a signature, does not verify. No byte of the result is given. |
| 38 | Seed_Too_Weak | The random seed of the program is weaker than the least strength that the caller accepts. value: the strength of the seed; limit: the least strength asked (1 weak, 2 processor, 3 entropy). Nothing is made. |
Read from contract/errors/errors.odin.
Units
| Number | Unit | In a sentence | What the contract says |
|---|---|---|---|
| 0 | None | ||
| 1 | Bytes | bytes | |
| 2 | Pages | pages | |
| 3 | Blocks | blocks | |
| 4 | Objects | objects | Objects of a store. |
| 5 | Stores | stores | |
| 6 | Programs | programs | |
| 7 | Threads | threads | |
| 8 | Handles | handles | The handle table of a program. |
| 9 | Mappings | mappings | |
| 10 | Modules | modules | Module records of a program. |
| 11 | Words | words | The words of one word wait. |
| 12 | Log_Records | log records in one second | Log records in one second. |
| 13 | Processor | microseconds of processor time in one second | Microseconds of processor time in one second. |
| 14 | Budgets | budgets | |
| 15 | Interrupts | interrupts | |
| 16 | Memory | memory objects | Memory objects of the machine. |
| 17 | Store | a private store | No_Grant: a private store. |
| 18 | Person | to act for the person | No_Grant: to act for the person. |
| 19 | Records | records | |
| 20 | Connection | a connection to this service | No_Grant: a connection to the service. |
| 21 | Milliseconds | milliseconds | |
| 22 | Connections | connections | The records of a TCP connection table (support/tcp). |
| 23 | Tcp_Ports | local TCP ports | The local TCP ports of a client grant. |
| 24 | Requests | requests in flight | Requests in flight. |
| 25 | Endpoint | a remote address and port | A remote of the network: an IPv4 address and a port, in one value (endpoint_pack). No_Grant: value the remote that the call names, limit the remote of the grant (0: none), found the local port when it is not a port of the endpoint. |
| 26 | Region | a data region | Absent: the data region of a ring. Overlap: bytes of the call region of an isolated call; value is their offset, limit their count. |
| 27 | Root_Commands | the commands of the root ring that change other programs | No_Grant: the commands of the root ring that change other programs. |
| 28 | Services | services that run | Services that run. |
| 29 | Grants | grants of the program | The grants of a program (system.Root_Grant). |
| 30 | Display | a surface on the screen | No_Grant: a surface on the screen (the ring to the compositor). |
| 31 | Terminal | a terminal | No_Grant: a terminal (the terminal ring and the text region). |
| 32 | Lent_Handles | handles lent for this call | Handle_Absent: the handle did not come through the call ring for this call (an isolated call). |
| 33 | Versions | versions of the object | Absent: the versions of an object (value: the generation that the argument named). |
| 34 | Counts | the counts of the blocks of the store | Damaged: the counts of the blocks of a store are not trusted after a fault of the service; it makes no change in the store. |
| 35 | References | names of one block | Over_Limit: the names of one block, which a count holds. |
| 36 | Commit_Blocks | blocks that one commit can change | Full: the blocks that one commit can change or write. |
Read from contract/errors/errors.odin.
