Esc

Time_Error_Kind

enumextensionsince 0.36.1Source
  • macOS: Time_Error_Kind works on macOS
  • Linux: Time_Error_Kind works on Linux
  • Windows: Time_Error_Kind works on Windows
  • Wasm: Time_Error_Kind works on Wasm

Declaration

Time_Error_Kind :: enum u8 {
    NONE;    INVALID_VALUE;    OUT_OF_RANGE;    OVERFLOW;    SYNTAX;    LIMIT;    GAP;    FOLD;    OFFSET_CONFLICT;    RELATIVE_REQUIRED;    IO;    NOT_FOUND;    UNSUPPORTED;}

Failure classification; e.g. error.kind == .NONE means success.

Example↗
_, error := date(2024, 13, 1);
assert(error.kind == .INVALID_VALUE);
_, parse_error := parse(Date, "nope");
assert(parse_error.kind == .SYNTAX);

See also