package odoc
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ce84fa7e0cc5f3e8a54e6adeb10826152798b602057b9e46c5ae7e5d5206812b
sha512=9febd413450ca2e3824c9ef7e1c9ae8d8094aa72ed71327a69d8d6b42f6f197b3f3f40d674de0d11fa1242ee0df95c693b5d74467d530704e1339f3a523452f6
doc/odoc.model/Odoc_model/Error/index.html
Module Odoc_model.Error
Source
val make :
?suggestion:string ->
('a, Format.formatter, unit, Location_.span -> t) format4 ->
'a
val filename_only :
?suggestion:string ->
('a, Format.formatter, unit, string -> t) format4 ->
'a
Raise a t
as an exception. Can be caught with catch
or catch_errors_and_warnings
.
Raise a warning that need to be caught with catch_warnings
. non_fatal
is false
by default.
Accumulate warnings into a global variable. See catch_warnings
.
Catch warnings accumulated by raise_warning
. Safe to nest.
Subtype of with_warnings
.
Combination of catch
and catch_warnings
.
type warnings_options = {
warn_error : bool;
(*If
*)true
, warnings will result in an error.print_warnings : bool;
(*Whether to print warnings.
*)warnings_tag : string option;
(*Whether to tag references to filter them later.
*)
}
val handle_warnings :
warnings_options:warnings_options ->
'a with_warnings ->
('a, [> `Msg of string ]) Result.result
Print warnings to stderr. If warn_error
is true
and there was warnings, returns an Error
.
val handle_errors_and_warnings :
warnings_options:warnings_options ->
'a with_errors_and_warnings ->
('a, [> `Msg of string ]) Result.result
Like handle_warnings
but works on the output of catch_errors_and_warnings
. Error case is converted into a `Msg
.
Used internally by handle_warnings
.
Convert a parsing error into a t
.
Like raise_warnings
but handle parsing errors.