package odoc

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Report non-fatal errors.

The main difference with Odoc_model.Error is that no precise location is attached to each failures, instead a filename is given to catch_failures.

val catch_failures : filename:string -> (unit -> 'a) -> 'a Odoc_model.Error.with_warnings

Catch failures that are reported by f. filename is the initial location of generated errors, more precise locations can be specified with with_location.

val report_internal : ('fmt, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'fmt

Internal errors happens during compiling and linking.

val report_root : name:string -> unit

Root errors happens when a dependency couldn't be loaded. These errors won't be made fatal in "warn error" mode.

val report_warning : ('fmt, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'fmt

Warnings are user errors.

val with_location : Odoc_model.Location_.span -> (unit -> 'a) -> 'a

Failures reported indirectly by this function will have a location attached.

val with_context : ('fmt, Stdlib.Format.formatter, unit, (unit -> 'a) -> 'a) Stdlib.format4 -> 'fmt

with_context "format string" format_arguments f adds context to failures reported by f ().

OCaml

Innovation. Community. Security.