Error Reference
LODE functions throw descriptive errors. This page catalogs all error messages by source.
Schema Validation (loadLode)
| Error | Cause |
|---|---|
Invalid schema type: expected "lode", got "<x>" | schema field is not "lode" |
Invalid schema version: <n> | Version is not a positive number |
Schema must have a non-empty name | name is missing or empty |
Schema must have at least one field | fields is empty or not an array |
Field <i>: id must be 1-255, got <n> | Field ID is out of the valid range |
Duplicate field id: <n> | Two fields share the same numeric ID |
Duplicate field name: "<name>" | Two fields share the same name |
Field "<name>": unknown type "<type>" | Type string is not one of the four supported types |
Encoding (compile)
| Error | Cause |
|---|---|
Required field "<name>" is missing | A required field is undefined or null in the source |
Unknown type "<type>" for field "<name>" | Type tag lookup failed (should not occur with validated schemas) |
Field "<name>" expected string, got <type> | Source value is not a string |
Field "<name>" expected boolean, got <type> | Source value is not a boolean |
Field "<name>" expected array, got <type> | Source value is not an array |
Field "<name>" expected object, got <type> | Source value for a map field is not an object |
Decoding (decode)
| Error | Cause |
|---|---|
Vein too short: expected at least 4 bytes | Input buffer is less than 4 bytes |
Invalid magic: expected 0x4C44 ("LD"), got 0x<xx><xx> | First two bytes are not LD |
Version mismatch: vein is v<n>, schema is v<m> | Binary version does not match schema version |
Unexpected end of vein at field <i> | Not enough bytes for the next field header |
Field <id> declares length <n> but only <m> bytes remain | Field data extends past end of buffer |
Required field "<name>" (id=<n>) not found in vein | A required field was not present in the binary |
Bool field "<name>" expected 1 byte, got <n> | Boolean field data is not exactly 1 byte |
Unknown type tag 0x<xx> for field "<name>" | Unrecognized type tag in binary |
Verification (verify)
verify never throws. It returns false on any error during decoding or fingerprint computation.
Last updated on