package archetype
Archetype language compiler
Install
Dune Dependency
Authors
Maintainers
Sources
1.4.2.tar.gz
md5=ba863c6395e80c84a60724189e68b7d2
sha512=5859f8a32c32dc316a3ab37ed536fcd1ded10762fde264ae0ab285935117c7d7b46899d0ba8ee9516bdf32f58215abf6b9a3912e58b8ef7f932d81790d395b35
doc/src/archetype/error.ml.html
Source file error.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
let flag = ref `Raise let exit_on_error () = flag := `Exit let raise_on_error () = flag := `Raise let resume_on_error () = flag := `Resume let errors = ref [] let warnings : (Position.t list * string) list ref = ref [] exception Error of Position.t list * string exception ParseError of (Position.t list * string) list exception Stop of int let print_error positions msg = Printf.sprintf "%s%s" (String.concat "\n" (List.map (fun p -> Position.string_of_pos p ^": ") positions)) msg let error_alert positions msg continue = if not !Options.quiet then output_string stderr (print_error positions msg); match !flag with | `Exit -> exit 1 | `Raise -> raise (Error (positions, msg)) | `Resume -> errors := (positions, msg)::!errors; continue () let add_warning positions msg continue = warnings := (positions, msg)::!warnings; continue () let global_error kind msg = error_alert [] (Printf.sprintf "Global Error (%s)\n %s" kind msg) let errorN kind poss msg = error_alert poss (Printf.sprintf "Error (%s)\n %s" kind msg) let error kind pos = errorN kind [pos] let error2 kind pos1 pos2 = errorN kind [pos1; pos2]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>