package bracetax

  1. Overview
  2. Docs

Parsing error messages.

type gravity = [
  1. | `fatal_error
  2. | `error
  3. | `warning
]
type message = [
  1. | `transformer_lost of string
  2. | `ignored_text_after_verbatim_begin of string
  3. | `malformed_verbatim_begin
  4. | `cell_out_of_table
  5. | `cell_inside_cell
  6. | `cell_out_of_table_bounds
  7. | `unknown_command of string
  8. | `begin_without_arg
  9. | `non_matching_end
  10. | `closing_brace_matching_begin
  11. | `nothing_to_end_with_brace
  12. | `item_out_of_list
  13. | `terminating_with_open_environments of string list
  14. | `bad_size_specification_in_image of string
  15. | `unknown_list_style of string
  16. | `end_of_input_not_in_text of string
  17. | `invalid_end_pattern of string
  18. | `command_shouldnot_have_args of string
  19. | `unknown_quotation_style of string
]
type location = {
  1. l_line : int;
  2. l_char : int;
  3. l_file : string;
}
type error = [
  1. | `message of location * gravity * message
  2. | `undefined of string
]
type error_fun = error -> unit
val mk : location -> gravity -> message -> error

Build an error message.

val to_string : (location * [< `error | `fatal_error | `warning ] * message) -> string

A built-in function for rendering errors as strings.

OCaml

Innovation. Community. Security.