Status Codes

0 — ok (success)

The operation completed. Code 0 appears as an ok completion rather than an error headline.


1 — out of range (runtime)

A number or index crossed an ordered bound. Use the reported value and any bound detail to choose an in-range value.


2 — wrong type (runtime)

A value has the wrong kind for this operation. Pass the kind named by the detail line.


3 — bad value (runtime)

The kind is acceptable, but that particular value is invalid in this domain. Argument details identify the rejected position.


4 — capacity exceeded (runtime)

A fixed table, buffer, image, or other bounded store is full. Store less data. Many of these errors add a note line that names the full store and its limit. The note gives a remedy only when one always works. For example: note: pending code is full (limit 4178 bytes) -- a save that succeeds frees it. A line longer than the device reads answers this code with note: the line limit is <n> bytes. A value that does not fit a buffer answers it with note: buffer is full (limit <n> bytes), and the buffer does not change. Limits lists each table and its size.


5 — overflow (runtime)

A result or stack would exceed its representable capacity. Reduce the input or the amount of nested work.


6 — underflow (runtime)

An operation needed a value that was not available, commonly on a stack. Supply the expected values or fix the calling shape.


7 — not found (runtime)

A requested name, field, or item does not exist. Check the reported name or define it first.


8 — invalid (language)

Source could not be read, parsed, or compiled. Fix the token identified by the message and caret.


9 — unsupported (device)

The operation or value is not supported by the active firmware or profile. Use a supported operation or a build that provides it.


10 — interrupted (runtime)

Evaluation was deliberately interrupted and is not catchable. At the prompt this is interrupted followed by ok; while restored boot code is running it is error: interrupted (10).


11 — corrupt data (device)

Persisted or incoming data failed validation: a bad magic number, a bad checksum, or a bad length. The data is damaged, so restore, wipe, rebuild, or reacquire it instead of using a partial result. An image with a different format or profile hash reports other release (27) instead. That answer does not check the rest of the image.


12 — i/o failed (device)

A peripheral or storage operation failed. Check power, wiring, media, and device state, then retry when safe.


13 — not saved (persistence)

Volatile state cannot be made durable. A rejected store is an error.

At the prompt, a bare save or save: stores slots holding handle values as nil and reports notice 100 instead. It still refuses with this code when the value cannot be made nil safely: a live Bluetooth connection, a slot installed in library mode, or more handle-bound slots than the device can hold at once. Rebind the named slot and retry.

set of a local to a Bytes value also answers this code, because the next loop pass can free the value. Make the value with here in the loop body.

Inside a program, save: does not reach this check at all — see code 26 .


14 — bad handle (resource)

A handle is closed, stale, or belongs to the wrong driver. Reopen the resource and pass a live handle of the expected kind.


15 — no network (network)

The network interface is disconnected. Reconnect it before retrying the operation.


16 — timed out (network)

A network operation did not complete in time. Check reachability and retry according to the application.


17 — dns failed (network)

A hostname could not be resolved. Check the hostname, DNS service, and network connection.


18 — refused (network)

The remote endpoint rejected the connection. Check the address, port, and server state.


19 — too large (network)

A network payload or response exceeds the supported bound. Reduce or split it.


20 — bad protocol (network)

A peer returned malformed or unexpected protocol data. Check that the endpoint and protocol agree.


21 — ble not ready (bluetooth)

The required Bluetooth state has not been established. Enable or configure the prerequisite state first.


22 — ble busy (bluetooth)

Another Bluetooth procedure is active or stopping. Wait for it to finish, or stop it before retrying.


23 — ble timed out (bluetooth)

A Bluetooth operation did not finish in time. Check range and peer state, then reconnect or retry.


24 — ble disconnected (bluetooth)

The Bluetooth peer disconnected. Reconnect before using peer-owned state.


25 — busy (resource)

A valid exclusive resource is already claimed. Reuse or close its existing handle, or select a different resource.


26 — prompt only (persistence)

This operation replaces the running program; issue it as its own complete prompt form. save, restore, and dangerous.wipe swap the image the running program is executing from, so they refuse while any word, event body, or boot routine is running. Catchable with attempt/rescue. Close the form first and run the word on its own.


27 — other release (persistence)

The saved image has a different image format or profile hash than this firmware. The device reads an image only when both match its own (see An Image From Another Release ). You see this at boot, when the device finds a saved image it cannot load, and from restore. Send your source again. Then type save. A save before you send your source writes an empty program over the old image.


Notice Codes

A notice reports something worth saying about a form that succeeded. Notice codes start at 100 so they can never be confused with a status code; they never appear as an error and cannot be caught.

100 — saved; handle values stored as nil (persistence)

save at the prompt kept your program running and wrote everything the image can carry. The slots named in the detail line hold handles — live connections to hardware — and no saved image can carry those, so they were stored as nil. Open those resources in boot and a reboot brings them back.

101 — handles are still open (handles)

close-handles could not close the kinds of handle that the detail line names. The platform keeps them, and a later close-handles tries again.

102 — word not called (prompt)

The line was a bare word, such as led.on, so the prompt shows the word and runs nothing. The detail says how to call it: led.on:.

103 — base word replaced (prompt)

A binding gave a new value to a name that held a base or library word, such as wait is 5. The binding stays. In the user tier, clear brings the old word back before save; after save, run wipe-user and restart the board, and note that wipe-user also removes the rest of the saved program. In library mode (after install-library) the binding is saved at once, and clear and wipe-user keep it: install the library again without it, then restart the board. The detail says to use another name to keep the word. Binding boot never gives this notice.