Module Toffee.ErrorSource

Sourcetype t =
  1. | Child_index_out_of_bounds of {
    1. parent : Node_id.t;
    2. child_index : int;
    3. child_count : int;
    }
    (*

    Child_index_out_of_bounds { parent; child_index; child_count } indicates an attempt to access child at child_index in parent, which has child_count children. Valid indices are 0 to child_count - 1.

    *)
  2. | Invalid_parent_node of Node_id.t
    (*

    Invalid_parent_node node_id indicates node_id does not exist in the tree. The node was either never created or has been removed.

    *)
  3. | Invalid_child_node of Node_id.t
    (*

    Invalid_child_node node_id indicates node_id does not exist in the tree. The node was either never created or has been removed.

    *)
  4. | Invalid_input_node of Node_id.t
    (*

    Invalid_input_node node_id indicates node_id does not exist in the tree. The node was either never created or has been removed.

    *)
Sourceval to_string : t -> string

to_string error converts error to a human-readable description.