Module Odoc_model.Error
val enable_missing_root_warning : bool Stdlib.refval make :
?suggestion:string ->
('a,
Stdlib.Format.formatter,
unit,
Odoc_model.Location_.span ->
Odoc_model.Error.t)
Stdlib.format4 ->
'aval filename_only :
?suggestion:string ->
('a, Stdlib.Format.formatter, unit, string -> Odoc_model.Error.t)
Stdlib.format4 ->
'aval to_string : Odoc_model.Error.t -> stringval raise_exception : Odoc_model.Error.t -> _Raise a t as an exception. Can be caught with catch or catch_errors_and_warnings.
val catch : (unit -> 'a) -> ('a, Odoc_model.Error.t) Stdlib.resultval raise_warning : ?non_fatal:bool -> Odoc_model.Error.t -> unitRaise a warning that need to be caught with catch_warnings. non_fatal is false by default.
val raise_warnings : 'a Odoc_model.Error.with_warnings -> 'aAccumulate warnings into a global variable. See catch_warnings.
val catch_warnings : (unit -> 'a) -> 'a Odoc_model.Error.with_warningsCatch warnings accumulated by raise_warning. Safe to nest.
type 'a with_errors_and_warnings =
('a, Odoc_model.Error.t) Stdlib.result Odoc_model.Error.with_warningsSubtype of with_warnings.
val raise_errors_and_warnings :
'a Odoc_model.Error.with_errors_and_warnings ->
'aval catch_errors_and_warnings :
(unit -> 'a) ->
'a Odoc_model.Error.with_errors_and_warningsCombination of catch and catch_warnings.
val handle_warnings :
warnings_options:Odoc_model.Error.warnings_options ->
'a Odoc_model.Error.with_warnings ->
('a, [> `Msg of string ]) Stdlib.resultPrint warnings to stderr. If warn_error is true and there was warnings, returns an Error.
val handle_errors_and_warnings :
warnings_options:Odoc_model.Error.warnings_options ->
'a Odoc_model.Error.with_errors_and_warnings ->
('a, [> `Msg of string ]) Stdlib.resultLike handle_warnings but works on the output of catch_errors_and_warnings. Error case is converted into a `Msg.
val print_errors : Odoc_model.Error.t list -> unitUsed internally by handle_warnings.
val unpack_warnings :
'a Odoc_model.Error.with_warnings ->
'a * Odoc_model.Error.t listval t_of_parser_t : Odoc_parser.Warning.t -> Odoc_model.Error.tConvert a parsing error into a t.
val raise_parser_warnings : Odoc_parser.t -> Odoc_parser.Ast.tLike raise_warnings but handle parsing errors.