package irmin-pack

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val finalise : ('a -> 'b) -> (unit -> 'c) -> 'd

Finaliser for a function that returns a result and doesn't raise exceptions.

If the finaliser fails, it is recommended to log the error.

val finalise_exn : ('a option -> 'b) -> (unit -> 'c) -> 'd

Finaliser for a function that might raise exceptions.

type base_error = [
  1. | `Double_close
  2. | `File_exists of string
  3. | `Invalid_parent_directory
  4. | `No_such_file_or_directory
  5. | `Not_a_file
  6. | `Read_out_of_bounds
  7. | `Invalid_argument
  8. | `Decoding_error
  9. | `Not_a_directory of string
  10. | `Index_failure of string
  11. | `Invalid_layout
  12. | `Corrupted_legacy_file
  13. | `Corrupted_mapping_file of string
  14. | `Pending_flush
  15. | `Rw_not_allowed
  16. | `Migration_needed
  17. | `Corrupted_control_file
  18. | `Sys_error of string
  19. | `V3_store_from_the_future
  20. | `Gc_forbidden_during_batch
  21. | `Unknown_major_pack_version of string
  22. | `Only_minimal_indexing_strategy_allowed
  23. | `Commit_key_is_dangling of string
  24. | `Dangling_key of string
  25. | `Gc_disallowed
  26. | `Node_or_contents_key_is_indexed of string
  27. | `Gc_process_error of string
  28. | `Corrupted_gc_result_file of string
  29. | `Gc_process_died_without_result_file of string
  30. | `Gc_forbidden_on_32bit_platforms
  31. | `Invalid_prefix_read of string
  32. | `Invalid_mapping_read of string
  33. | `Invalid_read_of_gced_object of string
  34. | `Inconsistent_store
  35. | `Split_forbidden_during_batch
  36. | `Multiple_empty_chunks
  37. | `Forbidden_during_gc
]

base_error is the type of most errors that can occur in a result, except for errors that have associated exceptions (see below) and backend-specific errors (see Io_errors).

val base_error_t : [ `Commit_key_is_dangling of string | `Corrupted_control_file | `Corrupted_gc_result_file of string | `Corrupted_legacy_file | `Corrupted_mapping_file of string | `Dangling_key of string | `Decoding_error | `Double_close | `File_exists of string | `Forbidden_during_gc | `Gc_disallowed | `Gc_forbidden_during_batch | `Gc_forbidden_on_32bit_platforms | `Gc_process_died_without_result_file of string | `Gc_process_error of string | `Inconsistent_store | `Index_failure of string | `Invalid_argument | `Invalid_layout | `Invalid_mapping_read of string | `Invalid_parent_directory | `Invalid_prefix_read of string | `Invalid_read_of_gced_object of string | `Migration_needed | `Multiple_empty_chunks | `No_such_file_or_directory | `Node_or_contents_key_is_indexed of string | `Not_a_directory of string | `Not_a_file | `Only_minimal_indexing_strategy_allowed | `Pending_flush | `Read_out_of_bounds | `Rw_not_allowed | `Split_forbidden_during_batch | `Sys_error of string | `Unknown_major_pack_version of string | `V3_store_from_the_future ] Irmin.Type.t
val pp_base_error : [ `Commit_key_is_dangling of string | `Corrupted_control_file | `Corrupted_gc_result_file of string | `Corrupted_legacy_file | `Corrupted_mapping_file of string | `Dangling_key of string | `Decoding_error | `Double_close | `File_exists of string | `Forbidden_during_gc | `Gc_disallowed | `Gc_forbidden_during_batch | `Gc_forbidden_on_32bit_platforms | `Gc_process_died_without_result_file of string | `Gc_process_error of string | `Inconsistent_store | `Index_failure of string | `Invalid_argument | `Invalid_layout | `Invalid_mapping_read of string | `Invalid_parent_directory | `Invalid_prefix_read of string | `Invalid_read_of_gced_object of string | `Migration_needed | `Multiple_empty_chunks | `No_such_file_or_directory | `Node_or_contents_key_is_indexed of string | `Not_a_directory of string | `Not_a_file | `Only_minimal_indexing_strategy_allowed | `Pending_flush | `Read_out_of_bounds | `Rw_not_allowed | `Split_forbidden_during_batch | `Sys_error of string | `Unknown_major_pack_version of string | `V3_store_from_the_future ] Repr.pp
type closed_error = [
  1. | `Closed
]
val closed_error_t : [ `Closed ] Irmin.Type.t
val pp_closed_error : [ `Closed ] Repr.pp
type read_only_error = [
  1. | `Ro_not_allowed
]
val read_only_error_t : [ `Ro_not_allowed ] Irmin.Type.t
val pp_read_only_error : [ `Ro_not_allowed ] Repr.pp
exception Pack_error of base_error
exception Closed
exception RO_not_allowed
module type S = sig ... end

Error manager

module Base : S with type t = error
OCaml

Innovation. Community. Security.