diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 22:40:13 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 22:40:13 +0200 |
| commit | f73bd5d0e33146c24af1e98bf9ea26bd8cbf004b (patch) | |
| tree | 790100dcc0077532d9446478e51d4cd40209c1c6 /lib/kernel/layer.ml | |
| parent | 2d8942e08edcbe5430f97270bdb1233e287600ee (diff) | |
| parent | 671c4264707ec8c81845059746632b00f2481d88 (diff) | |
| download | colitur-f73bd5d0e33146c24af1e98bf9ea26bd8cbf004b.tar.gz colitur-f73bd5d0e33146c24af1e98bf9ea26bd8cbf004b.zip | |
Merge branch 'robustness-and-hackability'
An audit of the shipped program, plus the fixes it found.
The citation parser accepted OCaml integer-literal syntax, so a typo like
'Luke 1_1:5' silently became a different chapter. Four pairs of different
books shared a full title -- 1 and 2 Corinthians both rendered 'Epistola
ad Corinthios' -- leaving 108 citations in 2027 alone that a reader could
not resolve to a book. Spec section 8.5 is now delivered rather than
recorded: shipped styles re-parse their own output. Overlay errors no
longer name OCaml source files at the reader.
Also: the new-overlay scaffold shows citations at the right nesting
level, config --show validates before printing, error messages no longer
echo whole file lines, and a month answers to both spellings of its own
name.
Diffstat (limited to 'lib/kernel/layer.ml')
| -rw-r--r-- | lib/kernel/layer.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/layer.ml b/lib/kernel/layer.ml index ec074a7..f069546 100644 --- a/lib/kernel/layer.ml +++ b/lib/kernel/layer.ml @@ -85,11 +85,11 @@ let load rank_of_sexp path = unterminated list or string) rather than [Sexplib.Sexp.Parse_error], so a catch-all here -- placed last among the exception branches -- is what actually keeps every parse failure inside [Error] instead of escaping. *) - | exception exn -> Error (Printf.sprintf "%s: %s" path (Printexc.to_string exn)) + | exception exn -> Error (Printf.sprintf "%s: %s" path (Sexp_error.humanise (Printexc.to_string exn))) | sexp -> ( match t_of_sexp rank_of_sexp sexp with | t -> Ok { t with entries = canonical t.entries } (* [rank_of_sexp] is caller-supplied and may raise anything, not only [Of_sexp_error] -- mirrors [Overlay.load]'s catch-all, so "never as an exception" (layer.mli) actually holds. *) - | exception exn -> Error (Printf.sprintf "%s: %s" path (Printexc.to_string exn))) + | exception exn -> Error (Printf.sprintf "%s: %s" path (Sexp_error.humanise (Printexc.to_string exn)))) |
