Location.ErrorFor a detailed explanation on error reporting, refer to the relevant part of the tutorial.
val createf : loc:t -> ('a, Stdlib.Format.formatter, unit, t) format4 -> 'aval message : t -> stringval register_error_of_exn : (exn -> t option) -> unitRegister an exception handler. Exception registered this way will be properly displayed by report_exception.
val of_exn : exn -> t optionval to_extension :
t ->
string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payloadConvert an error to an extension point. The compiler recognizes this and displays the error properly.
val raise : t -> 'aRaise a compiler Parsing.Location.Error exception. The composition of Location.Error.createf with Location.Error.raise is the same as Location.raise_errorf.
Update where the error is located. The old location will be overwritten.